﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader.IO;
using Terraria.UI;
using Terraria.Utilities;

namespace Terraria.ModLoader
{
	// Token: 0x02000199 RID: 409
	public static class ItemLoader
	{
		// Token: 0x060010E5 RID: 4325 RVA: 0x00405C30 File Offset: 0x00403E30
		private static ItemLoader.HookList AddHook<F>(Expression<Func<GlobalItem, F>> func)
		{
			ItemLoader.HookList hookList = new ItemLoader.HookList(ModLoader.Method<GlobalItem, F>(func));
			ItemLoader.hooks.Add(hookList);
			return hookList;
		}

		// Token: 0x060010E6 RID: 4326 RVA: 0x00405C58 File Offset: 0x00403E58
		private static void FindVanillaWings()
		{
			if (ItemLoader.vanillaWings[1] != 0)
			{
				return;
			}
			Item item = new Item();
			for (int i = 0; i < 3930; i++)
			{
				item.SetDefaults(i, false);
				if (item.wingSlot > 0)
				{
					ItemLoader.vanillaWings[(int)item.wingSlot] = i;
				}
			}
		}

		// Token: 0x060010E7 RID: 4327 RVA: 0x00405CA4 File Offset: 0x00403EA4
		internal static int ReserveItemID()
		{
			if (ModNet.AllowVanillaClients)
			{
				throw new Exception("Adding items breaks vanilla client compatiblity");
			}
			int result = ItemLoader.nextItem;
			ItemLoader.nextItem++;
			return result;
		}

		// Token: 0x060010E8 RID: 4328 RVA: 0x0000EC77 File Offset: 0x0000CE77
		public static ModItem GetItem(int type)
		{
			if (type < 3930 || type >= ItemLoader.ItemCount)
			{
				return null;
			}
			return ItemLoader.items[type - 3930];
		}

		// Token: 0x17000139 RID: 313
		// (get) Token: 0x060010E9 RID: 4329 RVA: 0x0000EC9C File Offset: 0x0000CE9C
		public static int ItemCount
		{
			get
			{
				return ItemLoader.nextItem;
			}
		}

		// Token: 0x060010EA RID: 4330 RVA: 0x00405CD8 File Offset: 0x00403ED8
		internal static void ResizeArrays(bool unloading)
		{
			Array.Resize<Texture2D>(ref Main.itemTexture, ItemLoader.nextItem);
			Array.Resize<bool>(ref Main.itemFlameLoaded, ItemLoader.nextItem);
			Array.Resize<Texture2D>(ref Main.itemFlameTexture, ItemLoader.nextItem);
			Array.Resize<DrawAnimation>(ref Main.itemAnimations, ItemLoader.nextItem);
			Array.Resize<int>(ref Item.itemCaches, ItemLoader.nextItem);
			Array.Resize<bool>(ref Item.staff, ItemLoader.nextItem);
			Array.Resize<bool>(ref Item.claw, ItemLoader.nextItem);
			Array.Resize<LocalizedText>(ref Lang._itemNameCache, ItemLoader.nextItem);
			Array.Resize<ItemTooltip>(ref Lang._itemTooltipCache, ItemLoader.nextItem);
			Array.Resize<ItemID.BannerEffect>(ref ItemID.Sets.BannerStrength, ItemLoader.nextItem);
			Array.Resize<int>(ref ItemID.Sets.KillsToBanner, ItemLoader.nextItem);
			Array.Resize<bool>(ref ItemID.Sets.CanFishInLava, ItemLoader.nextItem);
			Array.Resize<bool>(ref ItemID.Sets.TrapSigned, ItemLoader.nextItem);
			Array.Resize<bool>(ref ItemID.Sets.Deprecated, ItemLoader.nextItem);
			Array.Resize<bool>(ref ItemID.Sets.NeverShiny, ItemLoader.nextItem);
			Array.Resize<bool>(ref ItemID.Sets.ItemIconPulse, ItemLoader.nextItem);
			Array.Resize<bool>(ref ItemID.Sets.ItemNoGravity, ItemLoader.nextItem);
			Array.Resize<int>(ref ItemID.Sets.ExtractinatorMode, ItemLoader.nextItem);
			Array.Resize<int>(ref ItemID.Sets.StaffMinionSlotsRequired, ItemLoader.nextItem);
			Array.Resize<bool>(ref ItemID.Sets.ExoticPlantsForDyeTrade, ItemLoader.nextItem);
			Array.Resize<bool>(ref ItemID.Sets.NebulaPickup, ItemLoader.nextItem);
			Array.Resize<bool>(ref ItemID.Sets.AnimatesAsSoul, ItemLoader.nextItem);
			Array.Resize<bool>(ref ItemID.Sets.gunProj, ItemLoader.nextItem);
			Array.Resize<int>(ref ItemID.Sets.SortingPriorityBossSpawns, ItemLoader.nextItem);
			Array.Resize<int>(ref ItemID.Sets.SortingPriorityWiring, ItemLoader.nextItem);
			Array.Resize<int>(ref ItemID.Sets.SortingPriorityMaterials, ItemLoader.nextItem);
			Array.Resize<int>(ref ItemID.Sets.SortingPriorityExtractibles, ItemLoader.nextItem);
			Array.Resize<int>(ref ItemID.Sets.SortingPriorityRopes, ItemLoader.nextItem);
			Array.Resize<int>(ref ItemID.Sets.SortingPriorityPainting, ItemLoader.nextItem);
			Array.Resize<int>(ref ItemID.Sets.SortingPriorityTerraforming, ItemLoader.nextItem);
			Array.Resize<int>(ref ItemID.Sets.GamepadExtraRange, ItemLoader.nextItem);
			Array.Resize<bool>(ref ItemID.Sets.GamepadWholeScreenUseRange, ItemLoader.nextItem);
			Array.Resize<bool>(ref ItemID.Sets.GamepadSmartQuickReach, ItemLoader.nextItem);
			Array.Resize<bool>(ref ItemID.Sets.Yoyo, ItemLoader.nextItem);
			Array.Resize<bool>(ref ItemID.Sets.AlsoABuildingItem, ItemLoader.nextItem);
			Array.Resize<bool>(ref ItemID.Sets.LockOnIgnoresCollision, ItemLoader.nextItem);
			Array.Resize<int>(ref ItemID.Sets.LockOnAimAbove, ItemLoader.nextItem);
			Array.Resize<float?>(ref ItemID.Sets.LockOnAimCompensation, ItemLoader.nextItem);
			Array.Resize<bool>(ref ItemID.Sets.SingleUseInGamepad, ItemLoader.nextItem);
			for (int i = 3930; i < ItemLoader.nextItem; i++)
			{
				Lang._itemNameCache[i] = LocalizedText.Empty;
				Lang._itemTooltipCache[i] = ItemTooltip.None;
				ItemID.Sets.BannerStrength[i] = new ItemID.BannerEffect(1f);
				ItemID.Sets.KillsToBanner[i] = 50;
				Item.itemCaches[i] = -1;
				ItemID.Sets.ExtractinatorMode[i] = -1;
				ItemID.Sets.StaffMinionSlotsRequired[i] = 1;
				ItemID.Sets.SortingPriorityBossSpawns[i] = -1;
				ItemID.Sets.SortingPriorityWiring[i] = -1;
				ItemID.Sets.SortingPriorityMaterials[i] = -1;
				ItemID.Sets.SortingPriorityExtractibles[i] = -1;
				ItemID.Sets.SortingPriorityRopes[i] = -1;
				ItemID.Sets.SortingPriorityPainting[i] = -1;
				ItemID.Sets.SortingPriorityTerraforming[i] = -1;
			}
			if (unloading)
			{
				Array.Resize<int>(ref Main.anglerQuestItemNetIDs, ItemLoader.vanillaQuestFishCount);
			}
			else
			{
				Main.anglerQuestItemNetIDs = Main.anglerQuestItemNetIDs.Concat(from modItem in ItemLoader.items
				where modItem.IsQuestFish()
				select modItem.item.type).ToArray<int>();
			}
			ItemLoader.FindVanillaWings();
			ItemLoader.InstancedGlobals = (from g in ItemLoader.globalItems
			where g.InstancePerEntity
			select g).ToArray<GlobalItem>();
			for (int j = 0; j < ItemLoader.InstancedGlobals.Length; j++)
			{
				ItemLoader.InstancedGlobals[j].instanceIndex = j;
			}
			ItemLoader.NetGlobals = ModLoader.BuildGlobalHook<GlobalItem, Action<Item, BinaryWriter>>(ItemLoader.globalItems, (GlobalItem g) => (Action<Item, BinaryWriter>)Delegate.CreateDelegate(typeof(Action<Item, BinaryWriter>), g, methodof(GlobalItem.NetSend(Item, BinaryWriter))));
			foreach (ItemLoader.HookList hookList in ItemLoader.hooks)
			{
				hookList.arr = ModLoader.BuildGlobalHook<GlobalItem>(ItemLoader.globalItems, hookList.method);
			}
		}

		// Token: 0x060010EB RID: 4331 RVA: 0x0000ECA3 File Offset: 0x0000CEA3
		internal static void Unload()
		{
			ItemLoader.items.Clear();
			ItemLoader.nextItem = 3930;
			ItemLoader.globalItems.Clear();
			ItemLoader.globalIndexes.Clear();
			ItemLoader.globalIndexesByType.Clear();
			ItemLoader.animations.Clear();
		}

		// Token: 0x060010EC RID: 4332 RVA: 0x0000ECE1 File Offset: 0x0000CEE1
		internal static bool IsModItem(int index)
		{
			return index >= 3930;
		}

		// Token: 0x060010ED RID: 4333 RVA: 0x0000ECEE File Offset: 0x0000CEEE
		private static bool GeneralPrefix(Item item)
		{
			return item.maxStack == 1 && item.damage > 0 && item.ammo == 0 && !item.accessory;
		}

		// Token: 0x060010EE RID: 4334 RVA: 0x0000ED15 File Offset: 0x0000CF15
		internal static bool MeleePrefix(Item item)
		{
			return item.modItem != null && ItemLoader.GeneralPrefix(item) && item.melee && !item.noUseGraphic;
		}

		// Token: 0x060010EF RID: 4335 RVA: 0x0000ED3A File Offset: 0x0000CF3A
		internal static bool WeaponPrefix(Item item)
		{
			return item.modItem != null && ItemLoader.GeneralPrefix(item) && item.melee && item.noUseGraphic;
		}

		// Token: 0x060010F0 RID: 4336 RVA: 0x0000ED5C File Offset: 0x0000CF5C
		internal static bool RangedPrefix(Item item)
		{
			return item.modItem != null && ItemLoader.GeneralPrefix(item) && (item.ranged || item.thrown);
		}

		// Token: 0x060010F1 RID: 4337 RVA: 0x0000ED80 File Offset: 0x0000CF80
		internal static bool MagicPrefix(Item item)
		{
			return item.modItem != null && ItemLoader.GeneralPrefix(item) && (item.magic || item.summon);
		}

		// Token: 0x060010F2 RID: 4338 RVA: 0x00406190 File Offset: 0x00404390
		internal static void SetDefaults(Item item, bool createModItem = true)
		{
			if (ItemLoader.IsModItem(item.type) && createModItem)
			{
				item.modItem = ItemLoader.GetItem(item.type).NewInstance(item);
			}
			item.globalItems = (from g in ItemLoader.InstancedGlobals
			select g.NewInstance(item)).ToArray<GlobalItem>();
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.AutoDefaults();
			}
			ModItem modItem2 = item.modItem;
			if (modItem2 != null)
			{
				modItem2.SetDefaults();
			}
			foreach (GlobalItem globalItem in ItemLoader.HookSetDefaults.arr)
			{
				globalItem.Instance(item).SetDefaults(item);
			}
		}

		// Token: 0x060010F3 RID: 4339 RVA: 0x0040626C File Offset: 0x0040446C
		internal static GlobalItem GetGlobalItem(Item item, Mod mod, string name)
		{
			int index;
			if (!ItemLoader.globalIndexes.TryGetValue(mod.Name + ":" + name, out index))
			{
				return null;
			}
			return ItemLoader.globalItems[index].Instance(item);
		}

		// Token: 0x060010F4 RID: 4340 RVA: 0x004062AC File Offset: 0x004044AC
		internal static GlobalItem GetGlobalItem(Item item, Type type)
		{
			int num;
			if (!ItemLoader.globalIndexesByType.TryGetValue(type, out num))
			{
				return null;
			}
			if (num <= -1)
			{
				return null;
			}
			return ItemLoader.globalItems[num].Instance(item);
		}

		// Token: 0x060010F5 RID: 4341 RVA: 0x004062E4 File Offset: 0x004044E4
		internal static void DrawAnimatedItem(Item item, int whoAmI, Color color, Color alpha, float rotation, float scale)
		{
			int frameCount = Main.itemAnimations[item.type].FrameCount;
			int ticksPerFrame = Main.itemAnimations[item.type].TicksPerFrame;
			Main.itemFrameCounter[whoAmI]++;
			if (Main.itemFrameCounter[whoAmI] >= ticksPerFrame)
			{
				Main.itemFrameCounter[whoAmI] = 0;
				Main.itemFrame[whoAmI]++;
			}
			if (Main.itemFrame[whoAmI] >= frameCount)
			{
				Main.itemFrame[whoAmI] = 0;
			}
			Rectangle rectangle = Main.itemTexture[item.type].Frame(1, frameCount, 0, Main.itemFrame[whoAmI]);
			float num = (float)(item.width / 2 - rectangle.Width / 2);
			float num2 = (float)(item.height - rectangle.Height);
			Main.spriteBatch.Draw(Main.itemTexture[item.type], new Vector2(item.position.X - Main.screenPosition.X + (float)(rectangle.Width / 2) + num, item.position.Y - Main.screenPosition.Y + (float)(rectangle.Height / 2) + num2), new Rectangle?(rectangle), alpha, rotation, rectangle.Size() / 2f, scale, SpriteEffects.None, 0f);
			if (item.color != default(Color))
			{
				Main.spriteBatch.Draw(Main.itemTexture[item.type], new Vector2(item.position.X - Main.screenPosition.X + (float)(rectangle.Width / 2) + num, item.position.Y - Main.screenPosition.Y + (float)(rectangle.Height / 2) + num2), new Rectangle?(rectangle), item.GetColor(color), rotation, rectangle.Size() / 2f, scale, SpriteEffects.None, 0f);
			}
		}

		// Token: 0x060010F6 RID: 4342 RVA: 0x004064BC File Offset: 0x004046BC
		private static Rectangle AnimatedItemFrame(Item item)
		{
			int frameCount = Main.itemAnimations[item.type].FrameCount;
			int ticksPerFrame = Main.itemAnimations[item.type].TicksPerFrame;
			return Main.itemAnimations[item.type].GetFrame(Main.itemTexture[item.type]);
		}

		// Token: 0x060010F7 RID: 4343 RVA: 0x0040650C File Offset: 0x0040470C
		public static int ChoosePrefix(Item item, UnifiedRandom rand)
		{
			foreach (GlobalItem globalItem in ItemLoader.HookChoosePrefix.arr)
			{
				int num = globalItem.ChoosePrefix(item, rand);
				if (num >= 0)
				{
					return num;
				}
			}
			if (item.modItem != null)
			{
				return item.modItem.ChoosePrefix(rand);
			}
			return -1;
		}

		// Token: 0x060010F8 RID: 4344 RVA: 0x0040655C File Offset: 0x0040475C
		public static bool CanUseItem(Item item, Player player)
		{
			bool flag = true;
			if (item.modItem != null)
			{
				flag &= item.modItem.CanUseItem(player);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookCanUseItem.arr)
			{
				flag &= globalItem.Instance(item).CanUseItem(item, player);
			}
			return flag;
		}

		// Token: 0x060010F9 RID: 4345 RVA: 0x004065B4 File Offset: 0x004047B4
		public static void UseStyle(Item item, Player player)
		{
			if (item.IsAir)
			{
				return;
			}
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.UseStyle(player);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookUseStyle.arr)
			{
				globalItem.Instance(item).UseStyle(item, player);
			}
		}

		// Token: 0x060010FA RID: 4346 RVA: 0x00406608 File Offset: 0x00404808
		public static void HoldStyle(Item item, Player player)
		{
			if (item.IsAir || player.pulley || player.itemAnimation > 0)
			{
				return;
			}
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.HoldStyle(player);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookHoldStyle.arr)
			{
				globalItem.Instance(item).HoldStyle(item, player);
			}
		}

		// Token: 0x060010FB RID: 4347 RVA: 0x0040666C File Offset: 0x0040486C
		public static void HoldItem(Item item, Player player)
		{
			if (item.IsAir)
			{
				return;
			}
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.HoldItem(player);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookHoldItem.arr)
			{
				globalItem.Instance(item).HoldItem(item, player);
			}
		}

		// Token: 0x060010FC RID: 4348 RVA: 0x004066C0 File Offset: 0x004048C0
		public static float UseTimeMultiplier(Item item, Player player)
		{
			if (item.IsAir)
			{
				return 1f;
			}
			ModItem modItem = item.modItem;
			float num = (modItem != null) ? modItem.UseTimeMultiplier(player) : 1f;
			foreach (GlobalItem globalItem in ItemLoader.HookUseTimeMultiplier.arr)
			{
				num *= globalItem.Instance(item).UseTimeMultiplier(item, player);
			}
			return num;
		}

		// Token: 0x060010FD RID: 4349 RVA: 0x00406724 File Offset: 0x00404924
		public static float MeleeSpeedMultiplier(Item item, Player player)
		{
			if (item.IsAir)
			{
				return 1f;
			}
			ModItem modItem = item.modItem;
			float num = (modItem != null) ? modItem.MeleeSpeedMultiplier(player) : 1f;
			foreach (GlobalItem globalItem in ItemLoader.HookMeleeSpeedMultiplier.arr)
			{
				num *= globalItem.Instance(item).MeleeSpeedMultiplier(item, player);
			}
			return num;
		}

		// Token: 0x060010FE RID: 4350 RVA: 0x00406788 File Offset: 0x00404988
		public static void GetWeaponDamage(Item item, Player player, ref int damage)
		{
			if (item.IsAir)
			{
				return;
			}
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.GetWeaponDamage(player, ref damage);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookGetWeaponDamage.arr)
			{
				globalItem.Instance(item).GetWeaponDamage(item, player, ref damage);
			}
		}

		// Token: 0x060010FF RID: 4351 RVA: 0x004067E0 File Offset: 0x004049E0
		public static void GetWeaponKnockback(Item item, Player player, ref float knockback)
		{
			if (item.IsAir)
			{
				return;
			}
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.GetWeaponKnockback(player, ref knockback);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookGetWeaponKnockback.arr)
			{
				globalItem.Instance(item).GetWeaponKnockback(item, player, ref knockback);
			}
		}

		// Token: 0x06001100 RID: 4352 RVA: 0x00406838 File Offset: 0x00404A38
		public static void GetWeaponCrit(Item item, Player player, ref int crit)
		{
			if (item.IsAir)
			{
				return;
			}
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.GetWeaponCrit(player, ref crit);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookGetWeaponCrit.arr)
			{
				globalItem.Instance(item).GetWeaponCrit(item, player, ref crit);
			}
		}

		// Token: 0x06001101 RID: 4353 RVA: 0x0000EDA4 File Offset: 0x0000CFA4
		public static bool CheckProjOnSwing(Player player, Item item)
		{
			return item.modItem == null || !item.modItem.projOnSwing || player.itemAnimation == player.itemAnimationMax - 1;
		}

		// Token: 0x06001102 RID: 4354 RVA: 0x00406890 File Offset: 0x00404A90
		public static void PickAmmo(Item item, Player player, ref int type, ref float speed, ref int damage, ref float knockback)
		{
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.PickAmmo(player, ref type, ref speed, ref damage, ref knockback);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookPickAmmo.arr)
			{
				globalItem.Instance(item).PickAmmo(item, player, ref type, ref speed, ref damage, ref knockback);
			}
		}

		// Token: 0x06001103 RID: 4355 RVA: 0x004068E8 File Offset: 0x00404AE8
		public static bool ConsumeAmmo(Item item, Item ammo, Player player)
		{
			if ((item.modItem != null && !item.modItem.ConsumeAmmo(player)) || (ammo.modItem != null && !ammo.modItem.ConsumeAmmo(player)))
			{
				return false;
			}
			foreach (GlobalItem globalItem in ItemLoader.HookConsumeAmmo.arr)
			{
				if (!globalItem.Instance(item).ConsumeAmmo(item, player) || !globalItem.Instance(ammo).ConsumeAmmo(ammo, player))
				{
					return false;
				}
			}
			return true;
		}

		// Token: 0x06001104 RID: 4356 RVA: 0x00406964 File Offset: 0x00404B64
		public static void OnConsumeAmmo(Item item, Item ammo, Player player)
		{
			if (item.IsAir)
			{
				return;
			}
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.OnConsumeAmmo(player);
			}
			ModItem modItem2 = ammo.modItem;
			if (modItem2 != null)
			{
				modItem2.OnConsumeAmmo(player);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookConsumeAmmo.arr)
			{
				globalItem.Instance(item).OnConsumeAmmo(item, player);
				globalItem.Instance(ammo).OnConsumeAmmo(ammo, player);
			}
		}

		// Token: 0x06001105 RID: 4357 RVA: 0x004069D8 File Offset: 0x00404BD8
		public static bool Shoot(Item item, Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
		{
			foreach (GlobalItem globalItem in ItemLoader.HookShoot.arr)
			{
				if (!globalItem.Instance(item).Shoot(item, player, ref position, ref speedX, ref speedY, ref type, ref damage, ref knockBack))
				{
					return false;
				}
			}
			return item.modItem == null || item.modItem.Shoot(player, ref position, ref speedX, ref speedY, ref type, ref damage, ref knockBack);
		}

		// Token: 0x06001106 RID: 4358 RVA: 0x00406A44 File Offset: 0x00404C44
		public static void UseItemHitbox(Item item, Player player, ref Rectangle hitbox, ref bool noHitbox)
		{
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.UseItemHitbox(player, ref hitbox, ref noHitbox);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookUseItemHitbox.arr)
			{
				globalItem.Instance(item).UseItemHitbox(item, player, ref hitbox, ref noHitbox);
			}
		}

		// Token: 0x06001107 RID: 4359 RVA: 0x00406A94 File Offset: 0x00404C94
		public static void MeleeEffects(Item item, Player player, Rectangle hitbox)
		{
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.MeleeEffects(player, hitbox);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookMeleeEffects.arr)
			{
				globalItem.Instance(item).MeleeEffects(item, player, hitbox);
			}
		}

		// Token: 0x06001108 RID: 4360 RVA: 0x00406AE0 File Offset: 0x00404CE0
		public static bool? CanHitNPC(Item item, Player player, NPC target)
		{
			ModItem modItem = item.modItem;
			bool? result = (modItem != null) ? modItem.CanHitNPC(player, target) : null;
			if (result != null && !result.Value)
			{
				return new bool?(false);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookCanHitNPC.arr)
			{
				bool? flag = globalItem.Instance(item).CanHitNPC(item, player, target);
				if (flag != null)
				{
					if (!flag.Value)
					{
						return new bool?(false);
					}
					result = new bool?(true);
				}
			}
			return result;
		}

		// Token: 0x06001109 RID: 4361 RVA: 0x00406B78 File Offset: 0x00404D78
		public static void ModifyHitNPC(Item item, Player player, NPC target, ref int damage, ref float knockBack, ref bool crit)
		{
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.ModifyHitNPC(player, target, ref damage, ref knockBack, ref crit);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookModifyHitNPC.arr)
			{
				globalItem.Instance(item).ModifyHitNPC(item, player, target, ref damage, ref knockBack, ref crit);
			}
		}

		// Token: 0x0600110A RID: 4362 RVA: 0x00406BD0 File Offset: 0x00404DD0
		public static void OnHitNPC(Item item, Player player, NPC target, int damage, float knockBack, bool crit)
		{
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.OnHitNPC(player, target, damage, knockBack, crit);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookOnHitNPC.arr)
			{
				globalItem.Instance(item).OnHitNPC(item, player, target, damage, knockBack, crit);
			}
		}

		// Token: 0x0600110B RID: 4363 RVA: 0x00406C28 File Offset: 0x00404E28
		public static bool CanHitPvp(Item item, Player player, Player target)
		{
			foreach (GlobalItem globalItem in ItemLoader.HookCanHitPvp.arr)
			{
				if (!globalItem.Instance(item).CanHitPvp(item, player, target))
				{
					return false;
				}
			}
			return item.modItem == null || item.modItem.CanHitPvp(player, target);
		}

		// Token: 0x0600110C RID: 4364 RVA: 0x00406C7C File Offset: 0x00404E7C
		public static void ModifyHitPvp(Item item, Player player, Player target, ref int damage, ref bool crit)
		{
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.ModifyHitPvp(player, target, ref damage, ref crit);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookModifyHitPvp.arr)
			{
				globalItem.Instance(item).ModifyHitPvp(item, player, target, ref damage, ref crit);
			}
		}

		// Token: 0x0600110D RID: 4365 RVA: 0x00406CD0 File Offset: 0x00404ED0
		public static void OnHitPvp(Item item, Player player, Player target, int damage, bool crit)
		{
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.OnHitPvp(player, target, damage, crit);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookOnHitPvp.arr)
			{
				globalItem.Instance(item).OnHitPvp(item, player, target, damage, crit);
			}
		}

		// Token: 0x0600110E RID: 4366 RVA: 0x00406D24 File Offset: 0x00404F24
		public static bool UseItem(Item item, Player player)
		{
			if (item.IsAir)
			{
				return false;
			}
			bool flag = false;
			if (item.modItem != null)
			{
				flag |= item.modItem.UseItem(player);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookUseItem.arr)
			{
				flag |= globalItem.Instance(item).UseItem(item, player);
			}
			return flag;
		}

		// Token: 0x0600110F RID: 4367 RVA: 0x00406D84 File Offset: 0x00404F84
		public static bool ConsumeItem(Item item, Player player)
		{
			if (item.modItem != null && !item.modItem.ConsumeItem(player))
			{
				return false;
			}
			foreach (GlobalItem globalItem in ItemLoader.HookConsumeItem.arr)
			{
				if (!globalItem.Instance(item).ConsumeItem(item, player))
				{
					return false;
				}
			}
			ItemLoader.OnConsumeItem(item, player);
			return true;
		}

		// Token: 0x06001110 RID: 4368 RVA: 0x00406DE0 File Offset: 0x00404FE0
		public static void OnConsumeItem(Item item, Player player)
		{
			if (item.IsAir)
			{
				return;
			}
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.OnConsumeItem(player);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookOnConsumeItem.arr)
			{
				globalItem.Instance(item).OnConsumeItem(item, player);
			}
		}

		// Token: 0x06001111 RID: 4369 RVA: 0x00406E34 File Offset: 0x00405034
		public static bool UseItemFrame(Item item, Player player)
		{
			if (item.modItem != null && item.modItem.UseItemFrame(player))
			{
				return true;
			}
			foreach (GlobalItem globalItem in ItemLoader.HookUseItemFrame.arr)
			{
				if (globalItem.Instance(item).UseItemFrame(item, player))
				{
					return true;
				}
			}
			return false;
		}

		// Token: 0x06001112 RID: 4370 RVA: 0x00406E8C File Offset: 0x0040508C
		public static bool HoldItemFrame(Item item, Player player)
		{
			if (item.IsAir)
			{
				return false;
			}
			if (item.modItem != null && item.modItem.HoldItemFrame(player))
			{
				return true;
			}
			foreach (GlobalItem globalItem in ItemLoader.HookHoldItemFrame.arr)
			{
				if (globalItem.Instance(item).HoldItemFrame(item, player))
				{
					return true;
				}
			}
			return false;
		}

		// Token: 0x06001113 RID: 4371 RVA: 0x00406EEC File Offset: 0x004050EC
		public static bool AltFunctionUse(Item item, Player player)
		{
			if (item.IsAir)
			{
				return false;
			}
			if (item.modItem != null && item.modItem.AltFunctionUse(player))
			{
				return true;
			}
			foreach (GlobalItem globalItem in ItemLoader.HookAltFunctionUse.arr)
			{
				if (globalItem.Instance(item).AltFunctionUse(item, player))
				{
					return true;
				}
			}
			return false;
		}

		// Token: 0x06001114 RID: 4372 RVA: 0x00406F4C File Offset: 0x0040514C
		public static void UpdateInventory(Item item, Player player)
		{
			if (item.IsAir)
			{
				return;
			}
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.UpdateInventory(player);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookUpdateInventory.arr)
			{
				globalItem.Instance(item).UpdateInventory(item, player);
			}
		}

		// Token: 0x06001115 RID: 4373 RVA: 0x00406FA0 File Offset: 0x004051A0
		public static void UpdateEquip(Item item, Player player)
		{
			if (item.IsAir)
			{
				return;
			}
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.UpdateEquip(player);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookUpdateEquip.arr)
			{
				globalItem.Instance(item).UpdateEquip(item, player);
			}
		}

		// Token: 0x06001116 RID: 4374 RVA: 0x00406FF4 File Offset: 0x004051F4
		public static void UpdateAccessory(Item item, Player player, bool hideVisual)
		{
			if (item.IsAir)
			{
				return;
			}
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.UpdateAccessory(player, hideVisual);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookUpdateAccessory.arr)
			{
				globalItem.Instance(item).UpdateAccessory(item, player, hideVisual);
			}
		}

		// Token: 0x06001117 RID: 4375 RVA: 0x0040704C File Offset: 0x0040524C
		public static void UpdateVanity(Player player)
		{
			foreach (EquipType type in EquipLoader.EquipTypes)
			{
				int playerEquip = EquipLoader.GetPlayerEquip(player, type);
				EquipTexture equipTexture = EquipLoader.GetEquipTexture(type, playerEquip);
				if (equipTexture != null)
				{
					equipTexture.UpdateVanity(player, type);
				}
			}
		}

		// Token: 0x06001118 RID: 4376 RVA: 0x00407090 File Offset: 0x00405290
		public static void UpdateArmorSet(Player player, Item head, Item body, Item legs)
		{
			if (head.modItem != null && head.modItem.IsArmorSet(head, body, legs))
			{
				head.modItem.UpdateArmorSet(player);
			}
			if (body.modItem != null && body.modItem.IsArmorSet(head, body, legs))
			{
				body.modItem.UpdateArmorSet(player);
			}
			if (legs.modItem != null && legs.modItem.IsArmorSet(head, body, legs))
			{
				legs.modItem.UpdateArmorSet(player);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookUpdateArmorSet.arr)
			{
				string text = globalItem.IsArmorSet(head, body, legs);
				if (!string.IsNullOrEmpty(text))
				{
					globalItem.UpdateArmorSet(player, text);
				}
			}
		}

		// Token: 0x06001119 RID: 4377 RVA: 0x00407140 File Offset: 0x00405340
		public static void PreUpdateVanitySet(Player player)
		{
			EquipTexture equipTexture = EquipLoader.GetEquipTexture(EquipType.Head, player.head);
			EquipTexture equipTexture2 = EquipLoader.GetEquipTexture(EquipType.Body, player.body);
			EquipTexture equipTexture3 = EquipLoader.GetEquipTexture(EquipType.Legs, player.legs);
			if (equipTexture != null && equipTexture.IsVanitySet(player.head, player.body, player.legs))
			{
				equipTexture.PreUpdateVanitySet(player);
			}
			if (equipTexture2 != null && equipTexture2.IsVanitySet(player.head, player.body, player.legs))
			{
				equipTexture2.PreUpdateVanitySet(player);
			}
			if (equipTexture3 != null && equipTexture3.IsVanitySet(player.head, player.body, player.legs))
			{
				equipTexture3.PreUpdateVanitySet(player);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookPreUpdateVanitySet.arr)
			{
				string text = globalItem.IsVanitySet(player.head, player.body, player.legs);
				if (!string.IsNullOrEmpty(text))
				{
					globalItem.PreUpdateVanitySet(player, text);
				}
			}
		}

		// Token: 0x0600111A RID: 4378 RVA: 0x00407234 File Offset: 0x00405434
		public static void UpdateVanitySet(Player player)
		{
			EquipTexture equipTexture = EquipLoader.GetEquipTexture(EquipType.Head, player.head);
			EquipTexture equipTexture2 = EquipLoader.GetEquipTexture(EquipType.Body, player.body);
			EquipTexture equipTexture3 = EquipLoader.GetEquipTexture(EquipType.Legs, player.legs);
			if (equipTexture != null && equipTexture.IsVanitySet(player.head, player.body, player.legs))
			{
				equipTexture.UpdateVanitySet(player);
			}
			if (equipTexture2 != null && equipTexture2.IsVanitySet(player.head, player.body, player.legs))
			{
				equipTexture2.UpdateVanitySet(player);
			}
			if (equipTexture3 != null && equipTexture3.IsVanitySet(player.head, player.body, player.legs))
			{
				equipTexture3.UpdateVanitySet(player);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookUpdateVanitySet.arr)
			{
				string text = globalItem.IsVanitySet(player.head, player.body, player.legs);
				if (!string.IsNullOrEmpty(text))
				{
					globalItem.UpdateVanitySet(player, text);
				}
			}
		}

		// Token: 0x0600111B RID: 4379 RVA: 0x00407328 File Offset: 0x00405528
		public static void ArmorSetShadows(Player player)
		{
			EquipTexture equipTexture = EquipLoader.GetEquipTexture(EquipType.Head, player.head);
			EquipTexture equipTexture2 = EquipLoader.GetEquipTexture(EquipType.Body, player.body);
			EquipTexture equipTexture3 = EquipLoader.GetEquipTexture(EquipType.Legs, player.legs);
			if (equipTexture != null && equipTexture.IsVanitySet(player.head, player.body, player.legs))
			{
				equipTexture.ArmorSetShadows(player);
			}
			if (equipTexture2 != null && equipTexture2.IsVanitySet(player.head, player.body, player.legs))
			{
				equipTexture2.ArmorSetShadows(player);
			}
			if (equipTexture3 != null && equipTexture3.IsVanitySet(player.head, player.body, player.legs))
			{
				equipTexture3.ArmorSetShadows(player);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookArmorSetShadows.arr)
			{
				string text = globalItem.IsVanitySet(player.head, player.body, player.legs);
				if (!string.IsNullOrEmpty(text))
				{
					globalItem.ArmorSetShadows(player, text);
				}
			}
		}

		// Token: 0x0600111C RID: 4380 RVA: 0x0040741C File Offset: 0x0040561C
		public static void SetMatch(int armorSlot, int type, bool male, ref int equipSlot, ref bool robes)
		{
			EquipTexture equipTexture = EquipLoader.GetEquipTexture((EquipType)armorSlot, type);
			if (equipTexture != null)
			{
				equipTexture.SetMatch(male, ref equipSlot, ref robes);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookSetMatch.arr)
			{
				globalItem.SetMatch(armorSlot, type, male, ref equipSlot, ref robes);
			}
		}

		// Token: 0x0600111D RID: 4381 RVA: 0x00407468 File Offset: 0x00405668
		public static bool CanRightClick(Item item)
		{
			if (item.IsAir || !Main.mouseRight)
			{
				return false;
			}
			if (item.modItem != null && item.modItem.CanRightClick())
			{
				return true;
			}
			foreach (GlobalItem globalItem in ItemLoader.HookCanRightClick.arr)
			{
				if (globalItem.Instance(item).CanRightClick(item))
				{
					return true;
				}
			}
			return false;
		}

		// Token: 0x0600111E RID: 4382 RVA: 0x004074CC File Offset: 0x004056CC
		public static void RightClick(Item item, Player player)
		{
			if (!Main.mouseRightRelease)
			{
				return;
			}
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.RightClick(player);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookRightClick.arr)
			{
				globalItem.Instance(item).RightClick(item, player);
			}
			if (ItemLoader.ConsumeItem(item, player))
			{
				int num = item.stack - 1;
				item.stack = num;
				if (num == 0)
				{
					item.SetDefaults(0, false);
				}
			}
			Main.PlaySound(7, -1, -1, 1, 1f, 0f);
			Main.stackSplit = 30;
			Main.mouseRightRelease = false;
			Recipe.FindRecipes();
		}

		// Token: 0x0600111F RID: 4383 RVA: 0x0000EDCD File Offset: 0x0000CFCD
		public static bool IsModBossBag(Item item)
		{
			return item.modItem != null && item.modItem.bossBagNPC > 0;
		}

		// Token: 0x06001120 RID: 4384 RVA: 0x00407568 File Offset: 0x00405768
		public static void OpenBossBag(int type, Player player, ref int npc)
		{
			ModItem item = ItemLoader.GetItem(type);
			if (item != null && item.bossBagNPC > 0)
			{
				item.OpenBossBag(player);
				npc = item.bossBagNPC;
			}
		}

		// Token: 0x06001121 RID: 4385 RVA: 0x00407598 File Offset: 0x00405798
		public static bool PreOpenVanillaBag(string context, Player player, int arg)
		{
			foreach (GlobalItem globalItem in ItemLoader.HookPreOpenVanillaBag.arr)
			{
				if (!globalItem.PreOpenVanillaBag(context, player, arg))
				{
					NPCLoader.blockLoot.Clear();
					return false;
				}
			}
			return true;
		}

		// Token: 0x06001122 RID: 4386 RVA: 0x004075DC File Offset: 0x004057DC
		public static void OpenVanillaBag(string context, Player player, int arg)
		{
			foreach (GlobalItem globalItem in ItemLoader.HookOpenVanillaBag.arr)
			{
				globalItem.OpenVanillaBag(context, player, arg);
			}
		}

		// Token: 0x06001123 RID: 4387 RVA: 0x00407610 File Offset: 0x00405810
		public static bool ReforgePrice(Item item, ref int reforgePrice, ref bool canApplyDiscount)
		{
			ModItem modItem = item.modItem;
			bool flag = modItem == null || modItem.ReforgePrice(ref reforgePrice, ref canApplyDiscount);
			foreach (GlobalItem globalItem in ItemLoader.HookReforgePrice.arr)
			{
				flag &= globalItem.Instance(item).ReforgePrice(item, ref reforgePrice, ref canApplyDiscount);
			}
			return flag;
		}

		// Token: 0x06001124 RID: 4388 RVA: 0x00407664 File Offset: 0x00405864
		public static bool PreReforge(Item item)
		{
			ModItem modItem = item.modItem;
			bool flag = modItem == null || modItem.NewPreReforge();
			foreach (GlobalItem globalItem in ItemLoader.HookPreReforge.arr)
			{
				flag &= globalItem.Instance(item).NewPreReforge(item);
			}
			return flag;
		}

		// Token: 0x06001125 RID: 4389 RVA: 0x004076B4 File Offset: 0x004058B4
		public static void PostReforge(Item item)
		{
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.PostReforge();
			}
			foreach (GlobalItem globalItem in ItemLoader.HookPostReforge.arr)
			{
				globalItem.Instance(item).PostReforge(item);
			}
		}

		// Token: 0x06001126 RID: 4390 RVA: 0x004076FC File Offset: 0x004058FC
		public static void DrawHands(Player player, ref bool drawHands, ref bool drawArms)
		{
			EquipTexture equipTexture = EquipLoader.GetEquipTexture(EquipType.Body, player.body);
			if (equipTexture != null)
			{
				equipTexture.DrawHands(ref drawHands, ref drawArms);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookDrawHands.arr)
			{
				globalItem.DrawHands(player.body, ref drawHands, ref drawArms);
			}
		}

		// Token: 0x06001127 RID: 4391 RVA: 0x0040774C File Offset: 0x0040594C
		public static void DrawHair(Player player, ref bool drawHair, ref bool drawAltHair)
		{
			EquipTexture equipTexture = EquipLoader.GetEquipTexture(EquipType.Head, player.head);
			if (equipTexture != null)
			{
				equipTexture.DrawHair(ref drawHair, ref drawAltHair);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookDrawHair.arr)
			{
				globalItem.DrawHair(player.body, ref drawHair, ref drawAltHair);
			}
		}

		// Token: 0x06001128 RID: 4392 RVA: 0x0040779C File Offset: 0x0040599C
		public static bool DrawHead(Player player)
		{
			EquipTexture equipTexture = EquipLoader.GetEquipTexture(EquipType.Head, player.head);
			if (equipTexture != null && !equipTexture.DrawHead())
			{
				return false;
			}
			foreach (GlobalItem globalItem in ItemLoader.HookDrawHead.arr)
			{
				if (!globalItem.DrawHead(player.head))
				{
					return false;
				}
			}
			return true;
		}

		// Token: 0x06001129 RID: 4393 RVA: 0x004077F4 File Offset: 0x004059F4
		public static bool DrawBody(Player player)
		{
			EquipTexture equipTexture = EquipLoader.GetEquipTexture(EquipType.Body, player.body);
			if (equipTexture != null && !equipTexture.DrawBody())
			{
				return false;
			}
			foreach (GlobalItem globalItem in ItemLoader.HookDrawBody.arr)
			{
				if (!globalItem.DrawBody(player.head))
				{
					return false;
				}
			}
			return true;
		}

		// Token: 0x0600112A RID: 4394 RVA: 0x0040784C File Offset: 0x00405A4C
		public static bool DrawLegs(Player player)
		{
			EquipTexture equipTexture = EquipLoader.GetEquipTexture(EquipType.Legs, player.legs);
			if (equipTexture != null && !equipTexture.DrawLegs())
			{
				return false;
			}
			equipTexture = EquipLoader.GetEquipTexture(EquipType.Shoes, (int)player.shoe);
			if (equipTexture != null && !equipTexture.DrawLegs())
			{
				return false;
			}
			foreach (GlobalItem globalItem in ItemLoader.HookDrawLegs.arr)
			{
				if (!globalItem.DrawLegs(player.legs, (int)player.shoe))
				{
					return false;
				}
			}
			return true;
		}

		// Token: 0x0600112B RID: 4395 RVA: 0x004078C4 File Offset: 0x00405AC4
		public static void DrawArmorColor(EquipType type, int slot, Player drawPlayer, float shadow, ref Color color, ref int glowMask, ref Color glowMaskColor)
		{
			EquipTexture equipTexture = EquipLoader.GetEquipTexture(type, slot);
			if (equipTexture != null)
			{
				equipTexture.DrawArmorColor(drawPlayer, shadow, ref color, ref glowMask, ref glowMaskColor);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookDrawArmorColor.arr)
			{
				globalItem.DrawArmorColor(type, slot, drawPlayer, shadow, ref color, ref glowMask, ref glowMaskColor);
			}
		}

		// Token: 0x0600112C RID: 4396 RVA: 0x00407918 File Offset: 0x00405B18
		public static void ArmorArmGlowMask(int slot, Player drawPlayer, float shadow, ref int glowMask, ref Color color)
		{
			EquipTexture equipTexture = EquipLoader.GetEquipTexture(EquipType.Body, slot);
			if (equipTexture != null)
			{
				equipTexture.ArmorArmGlowMask(drawPlayer, shadow, ref glowMask, ref color);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookArmorArmGlowMask.arr)
			{
				globalItem.ArmorArmGlowMask(slot, drawPlayer, shadow, ref glowMask, ref color);
			}
		}

		// Token: 0x0600112D RID: 4397 RVA: 0x00407964 File Offset: 0x00405B64
		public static Item GetWing(Player player)
		{
			Item item = null;
			for (int i = 3; i < 8 + player.extraAccessorySlots; i++)
			{
				if ((int)player.armor[i].wingSlot == player.wingsLogic)
				{
					item = player.armor[i];
				}
			}
			if (item != null)
			{
				return item;
			}
			if (player.wingsLogic > 0 && player.wingsLogic < 40)
			{
				item = new Item();
				item.SetDefaults(ItemLoader.vanillaWings[player.wingsLogic], false);
				return item;
			}
			if (player.wingsLogic >= 40)
			{
				EquipTexture equipTexture = EquipLoader.GetEquipTexture(EquipType.Wings, player.wingsLogic);
				if (((equipTexture != null) ? equipTexture.item : null) != null)
				{
					return equipTexture.item.item;
				}
			}
			return null;
		}

		// Token: 0x0600112E RID: 4398 RVA: 0x00407A0C File Offset: 0x00405C0C
		public static void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
		{
			Item wing = ItemLoader.GetWing(player);
			if (wing == null)
			{
				EquipTexture equipTexture = EquipLoader.GetEquipTexture(EquipType.Wings, player.wingsLogic);
				if (equipTexture != null)
				{
					equipTexture.VerticalWingSpeeds(player, ref ascentWhenFalling, ref ascentWhenRising, ref maxCanAscendMultiplier, ref maxAscentMultiplier, ref constantAscend);
				}
				return;
			}
			ModItem modItem = wing.modItem;
			if (modItem != null)
			{
				modItem.VerticalWingSpeeds(player, ref ascentWhenFalling, ref ascentWhenRising, ref maxCanAscendMultiplier, ref maxAscentMultiplier, ref constantAscend);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookVerticalWingSpeeds.arr)
			{
				globalItem.VerticalWingSpeeds(wing, player, ref ascentWhenFalling, ref ascentWhenRising, ref maxCanAscendMultiplier, ref maxAscentMultiplier, ref constantAscend);
			}
		}

		// Token: 0x0600112F RID: 4399 RVA: 0x00407A8C File Offset: 0x00405C8C
		public static void HorizontalWingSpeeds(Player player)
		{
			Item wing = ItemLoader.GetWing(player);
			if (wing == null)
			{
				EquipTexture equipTexture = EquipLoader.GetEquipTexture(EquipType.Wings, player.wingsLogic);
				if (equipTexture != null)
				{
					equipTexture.HorizontalWingSpeeds(player, ref player.accRunSpeed, ref player.runAcceleration);
				}
				return;
			}
			ModItem modItem = wing.modItem;
			if (modItem != null)
			{
				modItem.HorizontalWingSpeeds(player, ref player.accRunSpeed, ref player.runAcceleration);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookHorizontalWingSpeeds.arr)
			{
				globalItem.Instance(wing).HorizontalWingSpeeds(wing, player, ref player.accRunSpeed, ref player.runAcceleration);
			}
		}

		// Token: 0x06001130 RID: 4400 RVA: 0x00407B20 File Offset: 0x00405D20
		public static bool WingUpdate(Player player, bool inUse)
		{
			if (player.wings <= 0)
			{
				return false;
			}
			EquipTexture equipTexture = EquipLoader.GetEquipTexture(EquipType.Wings, player.wings);
			bool? flag = (equipTexture != null) ? new bool?(equipTexture.WingUpdate(player, inUse)) : null;
			GlobalItem[] arr = ItemLoader.HookWingUpdate.arr;
			for (int i = 0; i < arr.Length; i++)
			{
				flag |= arr[i].WingUpdate(player.wings, player, inUse);
			}
			return flag ?? false;
		}

		// Token: 0x06001131 RID: 4401 RVA: 0x00407BB8 File Offset: 0x00405DB8
		public static void Update(Item item, ref float gravity, ref float maxFallSpeed)
		{
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.Update(ref gravity, ref maxFallSpeed);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookUpdate.arr)
			{
				globalItem.Instance(item).Update(item, ref gravity, ref maxFallSpeed);
			}
		}

		// Token: 0x06001132 RID: 4402 RVA: 0x00407C04 File Offset: 0x00405E04
		public static void PostUpdate(Item item)
		{
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.PostUpdate();
			}
			foreach (GlobalItem globalItem in ItemLoader.HookPostUpdate.arr)
			{
				globalItem.Instance(item).PostUpdate(item);
			}
		}

		// Token: 0x06001133 RID: 4403 RVA: 0x00407C4C File Offset: 0x00405E4C
		public static void GrabRange(Item item, Player player, ref int grabRange)
		{
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.GrabRange(player, ref grabRange);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookGrabRange.arr)
			{
				globalItem.Instance(item).GrabRange(item, player, ref grabRange);
			}
		}

		// Token: 0x06001134 RID: 4404 RVA: 0x00407C98 File Offset: 0x00405E98
		public static bool GrabStyle(Item item, Player player)
		{
			foreach (GlobalItem globalItem in ItemLoader.HookGrabStyle.arr)
			{
				if (globalItem.Instance(item).GrabStyle(item, player))
				{
					return true;
				}
			}
			return item.modItem != null && item.modItem.GrabStyle(player);
		}

		// Token: 0x06001135 RID: 4405 RVA: 0x00407CEC File Offset: 0x00405EEC
		public static bool CanPickup(Item item, Player player)
		{
			foreach (GlobalItem globalItem in ItemLoader.HookCanPickup.arr)
			{
				if (!globalItem.Instance(item).CanPickup(item, player))
				{
					return false;
				}
			}
			ModItem modItem = item.modItem;
			return modItem == null || modItem.CanPickup(player);
		}

		// Token: 0x06001136 RID: 4406 RVA: 0x00407D3C File Offset: 0x00405F3C
		public static bool OnPickup(Item item, Player player)
		{
			foreach (GlobalItem globalItem in ItemLoader.HookOnPickup.arr)
			{
				if (!globalItem.Instance(item).OnPickup(item, player))
				{
					return false;
				}
			}
			ModItem modItem = item.modItem;
			return modItem == null || modItem.OnPickup(player);
		}

		// Token: 0x06001137 RID: 4407 RVA: 0x00407D8C File Offset: 0x00405F8C
		public static bool ItemSpace(Item item, Player player)
		{
			foreach (GlobalItem globalItem in ItemLoader.HookItemSpace.arr)
			{
				if (globalItem.Instance(item).ItemSpace(item, player))
				{
					return true;
				}
			}
			ModItem modItem = item.modItem;
			return modItem != null && modItem.ItemSpace(player);
		}

		// Token: 0x06001138 RID: 4408 RVA: 0x00407DDC File Offset: 0x00405FDC
		public static Color? GetAlpha(Item item, Color lightColor)
		{
			if (item.IsAir)
			{
				return null;
			}
			foreach (GlobalItem globalItem in ItemLoader.HookGetAlpha.arr)
			{
				Color? alpha = globalItem.Instance(item).GetAlpha(item, lightColor);
				if (alpha != null)
				{
					return alpha;
				}
			}
			ModItem modItem = item.modItem;
			if (modItem == null)
			{
				return null;
			}
			return modItem.GetAlpha(lightColor);
		}

		// Token: 0x06001139 RID: 4409 RVA: 0x00407E50 File Offset: 0x00406050
		public static bool PreDrawInWorld(Item item, SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
		{
			bool flag = true;
			if (item.modItem != null)
			{
				flag &= item.modItem.PreDrawInWorld(spriteBatch, lightColor, alphaColor, ref rotation, ref scale, whoAmI);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookPreDrawInWorld.arr)
			{
				flag &= globalItem.Instance(item).PreDrawInWorld(item, spriteBatch, lightColor, alphaColor, ref rotation, ref scale, whoAmI);
			}
			return flag;
		}

		// Token: 0x0600113A RID: 4410 RVA: 0x00407EB8 File Offset: 0x004060B8
		public static void PostDrawInWorld(Item item, SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
		{
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.PostDrawInWorld(spriteBatch, lightColor, alphaColor, rotation, scale, whoAmI);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookPostDrawInWorld.arr)
			{
				globalItem.Instance(item).PostDrawInWorld(item, spriteBatch, lightColor, alphaColor, rotation, scale, whoAmI);
			}
		}

		// Token: 0x0600113B RID: 4411 RVA: 0x00407F14 File Offset: 0x00406114
		public static bool PreDrawInInventory(Item item, SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
		{
			bool flag = true;
			foreach (GlobalItem globalItem in ItemLoader.HookPreDrawInInventory.arr)
			{
				flag &= globalItem.Instance(item).PreDrawInInventory(item, spriteBatch, position, frame, drawColor, itemColor, origin, scale);
			}
			if (item.modItem != null)
			{
				flag &= item.modItem.PreDrawInInventory(spriteBatch, position, frame, drawColor, itemColor, origin, scale);
			}
			return flag;
		}

		// Token: 0x0600113C RID: 4412 RVA: 0x00407F80 File Offset: 0x00406180
		public static void PostDrawInInventory(Item item, SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
		{
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.PostDrawInInventory(spriteBatch, position, frame, drawColor, itemColor, origin, scale);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookPostDrawInInventory.arr)
			{
				globalItem.Instance(item).PostDrawInInventory(item, spriteBatch, position, frame, drawColor, itemColor, origin, scale);
			}
		}

		// Token: 0x0600113D RID: 4413 RVA: 0x00407FE0 File Offset: 0x004061E0
		public static void HoldoutOffset(float gravDir, int type, ref Vector2 offset)
		{
			ModItem item = ItemLoader.GetItem(type);
			if (item != null)
			{
				Vector2? vector = item.HoldoutOffset();
				if (vector != null)
				{
					offset.X = vector.Value.X;
					offset.Y += gravDir * vector.Value.Y;
				}
			}
			foreach (GlobalItem globalItem in ItemLoader.HookHoldoutOffset.arr)
			{
				Vector2? vector2 = globalItem.HoldoutOffset(type);
				if (vector2 != null)
				{
					offset.X = vector2.Value.X;
					offset.Y = (float)Main.itemTexture[type].Height / 2f + gravDir * vector2.Value.Y;
				}
			}
		}

		// Token: 0x0600113E RID: 4414 RVA: 0x0040809C File Offset: 0x0040629C
		public static void HoldoutOrigin(Player player, ref Vector2 origin)
		{
			Item item = player.inventory[player.selectedItem];
			Vector2 value = Vector2.Zero;
			if (item.modItem != null)
			{
				Vector2? vector = item.modItem.HoldoutOrigin();
				if (vector != null)
				{
					value = vector.Value;
				}
			}
			foreach (GlobalItem globalItem in ItemLoader.HookHoldoutOrigin.arr)
			{
				Vector2? vector2 = globalItem.HoldoutOrigin(item.type);
				if (vector2 != null)
				{
					value = vector2.Value;
				}
			}
			value.X *= (float)player.direction;
			value.Y *= -player.gravDir;
			origin += value;
		}

		// Token: 0x0600113F RID: 4415 RVA: 0x0040815C File Offset: 0x0040635C
		public static bool CanEquipAccessory(Item item, int slot)
		{
			Player player = Main.player[Main.myPlayer];
			if (item.modItem != null && !item.modItem.CanEquipAccessory(player, slot))
			{
				return false;
			}
			foreach (GlobalItem globalItem in ItemLoader.HookCanEquipAccessory.arr)
			{
				if (!globalItem.Instance(item).CanEquipAccessory(item, player, slot))
				{
					return false;
				}
			}
			return true;
		}

		// Token: 0x06001140 RID: 4416 RVA: 0x004081C0 File Offset: 0x004063C0
		public static void ExtractinatorUse(ref int resultType, ref int resultStack, int extractType)
		{
			ModItem item = ItemLoader.GetItem(extractType);
			if (item != null)
			{
				item.ExtractinatorUse(ref resultType, ref resultStack);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookExtractinatorUse.arr)
			{
				globalItem.ExtractinatorUse(extractType, ref resultType, ref resultStack);
			}
		}

		// Token: 0x06001141 RID: 4417 RVA: 0x0000EDE7 File Offset: 0x0000CFE7
		public static void AutoLightSelect(Item item, ref bool dryTorch, ref bool wetTorch, ref bool glowstick)
		{
			if (item.modItem != null)
			{
				item.modItem.AutoLightSelect(ref dryTorch, ref wetTorch, ref glowstick);
				if (wetTorch)
				{
					dryTorch = false;
					glowstick = false;
				}
				if (dryTorch)
				{
					glowstick = false;
				}
			}
		}

		// Token: 0x06001142 RID: 4418 RVA: 0x00408208 File Offset: 0x00406408
		public static void CaughtFishStack(Item item)
		{
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.CaughtFishStack(ref item.stack);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookCaughtFishStack.arr)
			{
				globalItem.Instance(item).CaughtFishStack(item.type, ref item.stack);
			}
		}

		// Token: 0x06001143 RID: 4419 RVA: 0x00408264 File Offset: 0x00406464
		public static void IsAnglerQuestAvailable(int itemID, ref bool notAvailable)
		{
			ModItem item = ItemLoader.GetItem(itemID);
			if (item != null)
			{
				notAvailable &= !item.IsAnglerQuestAvailable();
			}
			foreach (GlobalItem globalItem in ItemLoader.HookIsAnglerQuestAvailable.arr)
			{
				notAvailable &= !globalItem.IsAnglerQuestAvailable(itemID);
			}
		}

		// Token: 0x06001144 RID: 4420 RVA: 0x004082B8 File Offset: 0x004064B8
		public static string AnglerChat(int type)
		{
			string text = "";
			string text2 = "";
			ModItem item = ItemLoader.GetItem(type);
			if (item != null)
			{
				item.AnglerQuestChat(ref text, ref text2);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookAnglerChat.arr)
			{
				globalItem.AnglerChat(type, ref text, ref text2);
			}
			if (string.IsNullOrEmpty(text) || string.IsNullOrEmpty(text2))
			{
				return null;
			}
			return text + "\n\n(" + text2 + ")";
		}

		// Token: 0x06001145 RID: 4421 RVA: 0x00408334 File Offset: 0x00406534
		public static void OnCraft(Item item, Recipe recipe)
		{
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.OnCraft(recipe);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookOnCraft.arr)
			{
				globalItem.Instance(item).OnCraft(item, recipe);
			}
		}

		// Token: 0x06001146 RID: 4422 RVA: 0x00408380 File Offset: 0x00406580
		public static bool PreDrawTooltip(Item item, ReadOnlyCollection<TooltipLine> lines, ref int x, ref int y)
		{
			ModItem modItem = item.modItem;
			bool flag = modItem == null || modItem.PreDrawTooltip(lines, ref x, ref y);
			List<bool> list = new List<bool>();
			foreach (GlobalItem globalItem in ItemLoader.HookPreDrawTooltip.arr)
			{
				list.Add(globalItem.PreDrawTooltip(item, lines, ref x, ref y));
			}
			if (flag)
			{
				return list.All((bool z) => z);
			}
			return false;
		}

		// Token: 0x06001147 RID: 4423 RVA: 0x00408404 File Offset: 0x00406604
		public static void PostDrawTooltip(Item item, ReadOnlyCollection<DrawableTooltipLine> lines)
		{
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.PostDrawTooltip(lines);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookPostDrawTooltip.arr)
			{
				globalItem.PostDrawTooltip(item, lines);
			}
		}

		// Token: 0x06001148 RID: 4424 RVA: 0x00408448 File Offset: 0x00406648
		public static bool PreDrawTooltipLine(Item item, DrawableTooltipLine line, ref int yOffset)
		{
			ModItem modItem = item.modItem;
			bool flag = modItem == null || modItem.PreDrawTooltipLine(line, ref yOffset);
			List<bool> list = new List<bool>();
			foreach (GlobalItem globalItem in ItemLoader.HookPreDrawTooltipLine.arr)
			{
				list.Add(globalItem.PreDrawTooltipLine(item, line, ref yOffset));
			}
			if (flag)
			{
				return list.All((bool x) => x);
			}
			return false;
		}

		// Token: 0x06001149 RID: 4425 RVA: 0x004084C8 File Offset: 0x004066C8
		public static void PostDrawTooltipLine(Item item, DrawableTooltipLine line)
		{
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.PostDrawTooltipLine(line);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookPostDrawTooltipLine.arr)
			{
				globalItem.PostDrawTooltipLine(item, line);
			}
		}

		// Token: 0x0600114A RID: 4426 RVA: 0x0040850C File Offset: 0x0040670C
		public static List<TooltipLine> ModifyTooltips(Item item, ref int numTooltips, string[] names, ref string[] text, ref bool[] modifier, ref bool[] badModifier, ref int oneDropLogo, out Color?[] overrideColor)
		{
			List<TooltipLine> list = new List<TooltipLine>();
			for (int i = 0; i < numTooltips; i++)
			{
				TooltipLine tooltipLine = new TooltipLine(names[i], text[i]);
				tooltipLine.isModifier = modifier[i];
				tooltipLine.isModifierBad = badModifier[i];
				if (i == oneDropLogo)
				{
					tooltipLine.oneDropLogo = true;
				}
				list.Add(tooltipLine);
			}
			ModItem modItem = item.modItem;
			if (modItem != null)
			{
				modItem.ModifyTooltips(list);
			}
			foreach (GlobalItem globalItem in ItemLoader.HookModifyTooltips.arr)
			{
				globalItem.Instance(item).ModifyTooltips(item, list);
			}
			numTooltips = list.Count;
			text = new string[numTooltips];
			modifier = new bool[numTooltips];
			badModifier = new bool[numTooltips];
			oneDropLogo = -1;
			overrideColor = new Color?[numTooltips];
			for (int k = 0; k < numTooltips; k++)
			{
				text[k] = list[k].text;
				modifier[k] = list[k].isModifier;
				badModifier[k] = list[k].isModifierBad;
				if (list[k].oneDropLogo)
				{
					oneDropLogo = k;
				}
				overrideColor[k] = list[k].overrideColor;
			}
			return list;
		}

		// Token: 0x0600114B RID: 4427 RVA: 0x00408650 File Offset: 0x00406850
		public static bool NeedsModSaving(Item item)
		{
			return item.type != 0 && (item.modItem != null || item.prefix >= 84 || ItemLoader.HookNeedsSaving.arr.Count((GlobalItem g) => g.Instance(item).NeedsSaving(item)) > 0);
		}

		// Token: 0x0600114C RID: 4428 RVA: 0x004086B8 File Offset: 0x004068B8
		internal static void WriteNetGlobalOrder(BinaryWriter w)
		{
			w.Write((short)ItemLoader.NetGlobals.Length);
			foreach (GlobalItem globalItem in ItemLoader.NetGlobals)
			{
				w.Write(globalItem.mod.netID);
				w.Write(globalItem.Name);
			}
		}

		// Token: 0x0600114D RID: 4429 RVA: 0x00408708 File Offset: 0x00406908
		internal static void ReadNetGlobalOrder(BinaryReader r)
		{
			short num = r.ReadInt16();
			ItemLoader.NetGlobals = new GlobalItem[(int)num];
			for (short num2 = 0; num2 < num; num2 += 1)
			{
				ItemLoader.NetGlobals[(int)num2] = ModNet.GetMod((int)r.ReadInt16()).GetGlobalItem(r.ReadString());
			}
		}

		// Token: 0x0600114E RID: 4430 RVA: 0x0000EE10 File Offset: 0x0000D010
		private static bool HasMethod(Type t, string method, params Type[] args)
		{
			return t.GetMethod(method, args).DeclaringType != typeof(GlobalItem);
		}

		// Token: 0x0600114F RID: 4431 RVA: 0x00408754 File Offset: 0x00406954
		internal static void VerifyGlobalItem(GlobalItem item)
		{
			Type type = item.GetType();
			int num = 0;
			if (ItemLoader.HasMethod(type, "NeedsSaving", new Type[]
			{
				typeof(Item)
			}))
			{
				num++;
			}
			if (ItemLoader.HasMethod(type, "Save", new Type[]
			{
				typeof(Item)
			}))
			{
				num++;
			}
			if (ItemLoader.HasMethod(type, "Load", new Type[]
			{
				typeof(Item),
				typeof(TagCompound)
			}))
			{
				num++;
			}
			if (num > 0 && num < 3)
			{
				throw new Exception(type + " must override all of (NeedsSaving/Save/Load) or none");
			}
			int num2 = 0;
			if (ItemLoader.HasMethod(type, "NetSend", new Type[]
			{
				typeof(Item),
				typeof(BinaryWriter)
			}))
			{
				num2++;
			}
			if (ItemLoader.HasMethod(type, "NetReceive", new Type[]
			{
				typeof(Item),
				typeof(BinaryReader)
			}))
			{
				num2++;
			}
			if (num2 == 1)
			{
				throw new Exception(type + " must override both of (NetSend/NetReceive) or none");
			}
			bool flag = type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).Any((FieldInfo f) => f.DeclaringType != typeof(GlobalItem));
			if (flag)
			{
				if (!item.InstancePerEntity)
				{
					throw new Exception(type + " has instance fields but does not set InstancePerEntity to true. Either use static fields, or per instance globals");
				}
				if (!item.CloneNewInstances && !ItemLoader.HasMethod(type, "NewInstance", new Type[]
				{
					typeof(Item)
				}) && !ItemLoader.HasMethod(type, "Clone", new Type[]
				{
					typeof(Item),
					typeof(Item)
				}))
				{
					throw new Exception(type + " has InstancePerEntity but must either set CloneNewInstances to true, or override NewInstance(Item) or Clone(Item, Item)");
				}
			}
		}

		// Token: 0x04001387 RID: 4999
		private static int nextItem = 3930;

		// Token: 0x04001388 RID: 5000
		internal static readonly IList<ModItem> items = new List<ModItem>();

		// Token: 0x04001389 RID: 5001
		internal static readonly IList<GlobalItem> globalItems = new List<GlobalItem>();

		// Token: 0x0400138A RID: 5002
		internal static GlobalItem[] InstancedGlobals = new GlobalItem[0];

		// Token: 0x0400138B RID: 5003
		internal static GlobalItem[] NetGlobals;

		// Token: 0x0400138C RID: 5004
		internal static readonly IDictionary<string, int> globalIndexes = new Dictionary<string, int>();

		// Token: 0x0400138D RID: 5005
		internal static readonly IDictionary<Type, int> globalIndexesByType = new Dictionary<Type, int>();

		// Token: 0x0400138E RID: 5006
		internal static readonly ISet<int> animations = new HashSet<int>();

		// Token: 0x0400138F RID: 5007
		internal static readonly int vanillaQuestFishCount = Main.anglerQuestItemNetIDs.Length;

		// Token: 0x04001390 RID: 5008
		internal static readonly int[] vanillaWings = new int[40];

		// Token: 0x04001391 RID: 5009
		private static List<ItemLoader.HookList> hooks = new List<ItemLoader.HookList>();

		// Token: 0x04001392 RID: 5010
		private static ItemLoader.HookList HookSetDefaults = ItemLoader.AddHook<Action<Item>>((GlobalItem g) => (Action<Item>)Delegate.CreateDelegate(typeof(Action<Item>), g, methodof(GlobalItem.SetDefaults(Item))));

		// Token: 0x04001393 RID: 5011
		private static ItemLoader.HookList HookChoosePrefix = ItemLoader.AddHook<Func<Item, UnifiedRandom, int>>((GlobalItem g) => (Func<Item, UnifiedRandom, int>)Delegate.CreateDelegate(typeof(Func<Item, UnifiedRandom, int>), g, methodof(GlobalItem.ChoosePrefix(Item, UnifiedRandom))));

		// Token: 0x04001394 RID: 5012
		private static ItemLoader.HookList HookCanUseItem = ItemLoader.AddHook<Func<Item, Player, bool>>((GlobalItem g) => (Func<Item, Player, bool>)Delegate.CreateDelegate(typeof(Func<Item, Player, bool>), g, methodof(GlobalItem.CanUseItem(Item, Player))));

		// Token: 0x04001395 RID: 5013
		private static ItemLoader.HookList HookUseStyle = ItemLoader.AddHook<Action<Item, Player>>((GlobalItem g) => (Action<Item, Player>)Delegate.CreateDelegate(typeof(Action<Item, Player>), g, methodof(GlobalItem.UseStyle(Item, Player))));

		// Token: 0x04001396 RID: 5014
		private static ItemLoader.HookList HookHoldStyle = ItemLoader.AddHook<Action<Item, Player>>((GlobalItem g) => (Action<Item, Player>)Delegate.CreateDelegate(typeof(Action<Item, Player>), g, methodof(GlobalItem.HoldStyle(Item, Player))));

		// Token: 0x04001397 RID: 5015
		private static ItemLoader.HookList HookHoldItem = ItemLoader.AddHook<Action<Item, Player>>((GlobalItem g) => (Action<Item, Player>)Delegate.CreateDelegate(typeof(Action<Item, Player>), g, methodof(GlobalItem.HoldItem(Item, Player))));

		// Token: 0x04001398 RID: 5016
		private static ItemLoader.HookList HookUseTimeMultiplier = ItemLoader.AddHook<Func<Item, Player, float>>((GlobalItem g) => (Func<Item, Player, float>)Delegate.CreateDelegate(typeof(Func<Item, Player, float>), g, methodof(GlobalItem.UseTimeMultiplier(Item, Player))));

		// Token: 0x04001399 RID: 5017
		private static ItemLoader.HookList HookMeleeSpeedMultiplier = ItemLoader.AddHook<Func<Item, Player, float>>((GlobalItem g) => (Func<Item, Player, float>)Delegate.CreateDelegate(typeof(Func<Item, Player, float>), g, methodof(GlobalItem.MeleeSpeedMultiplier(Item, Player))));

		// Token: 0x0400139A RID: 5018
		private static ItemLoader.HookList HookGetWeaponDamage = ItemLoader.AddHook<ItemLoader.DelegateGetWeaponDamage>((GlobalItem g) => (ItemLoader.DelegateGetWeaponDamage)Delegate.CreateDelegate(typeof(ItemLoader.DelegateGetWeaponDamage), g, methodof(GlobalItem.GetWeaponDamage(Item, Player, int*))));

		// Token: 0x0400139B RID: 5019
		private static ItemLoader.HookList HookGetWeaponKnockback = ItemLoader.AddHook<ItemLoader.DelegateGetWeaponKnockback>((GlobalItem g) => (ItemLoader.DelegateGetWeaponKnockback)Delegate.CreateDelegate(typeof(ItemLoader.DelegateGetWeaponKnockback), g, methodof(GlobalItem.GetWeaponKnockback(Item, Player, float*))));

		// Token: 0x0400139C RID: 5020
		private static ItemLoader.HookList HookGetWeaponCrit = ItemLoader.AddHook<ItemLoader.DelegateGetWeaponCrit>((GlobalItem g) => (ItemLoader.DelegateGetWeaponCrit)Delegate.CreateDelegate(typeof(ItemLoader.DelegateGetWeaponCrit), g, methodof(GlobalItem.GetWeaponCrit(Item, Player, int*))));

		// Token: 0x0400139D RID: 5021
		private static ItemLoader.HookList HookPickAmmo = ItemLoader.AddHook<ItemLoader.DelegatePickAmmo>((GlobalItem g) => (ItemLoader.DelegatePickAmmo)Delegate.CreateDelegate(typeof(ItemLoader.DelegatePickAmmo), g, methodof(GlobalItem.PickAmmo(Item, Player, int*, float*, int*, float*))));

		// Token: 0x0400139E RID: 5022
		private static ItemLoader.HookList HookConsumeAmmo = ItemLoader.AddHook<Func<Item, Player, bool>>((GlobalItem g) => (Func<Item, Player, bool>)Delegate.CreateDelegate(typeof(Func<Item, Player, bool>), g, methodof(GlobalItem.ConsumeAmmo(Item, Player))));

		// Token: 0x0400139F RID: 5023
		private static ItemLoader.HookList HookOnConsumeAmmo = ItemLoader.AddHook<Action<Item, Player>>((GlobalItem g) => (Action<Item, Player>)Delegate.CreateDelegate(typeof(Action<Item, Player>), g, methodof(GlobalItem.OnConsumeAmmo(Item, Player))));

		// Token: 0x040013A0 RID: 5024
		private static ItemLoader.HookList HookShoot = ItemLoader.AddHook<ItemLoader.DelegateShoot>((GlobalItem g) => (ItemLoader.DelegateShoot)Delegate.CreateDelegate(typeof(ItemLoader.DelegateShoot), g, methodof(GlobalItem.Shoot(Item, Player, Vector2*, float*, float*, int*, int*, float*))));

		// Token: 0x040013A1 RID: 5025
		private static ItemLoader.HookList HookUseItemHitbox = ItemLoader.AddHook<ItemLoader.DelegateUseItemHitbox>((GlobalItem g) => (ItemLoader.DelegateUseItemHitbox)Delegate.CreateDelegate(typeof(ItemLoader.DelegateUseItemHitbox), g, methodof(GlobalItem.UseItemHitbox(Item, Player, Rectangle*, bool*))));

		// Token: 0x040013A2 RID: 5026
		private static ItemLoader.HookList HookMeleeEffects = ItemLoader.AddHook<Action<Item, Player, Rectangle>>((GlobalItem g) => (Action<Item, Player, Rectangle>)Delegate.CreateDelegate(typeof(Action<Item, Player, Rectangle>), g, methodof(GlobalItem.MeleeEffects(Item, Player, Rectangle))));

		// Token: 0x040013A3 RID: 5027
		private static ItemLoader.HookList HookCanHitNPC = ItemLoader.AddHook<Func<Item, Player, NPC, bool?>>((GlobalItem g) => (Func<Item, Player, NPC, bool?>)Delegate.CreateDelegate(typeof(Func<Item, Player, NPC, bool?>), g, methodof(GlobalItem.CanHitNPC(Item, Player, NPC))));

		// Token: 0x040013A4 RID: 5028
		private static ItemLoader.HookList HookModifyHitNPC = ItemLoader.AddHook<ItemLoader.DelegateModifyHitNPC>((GlobalItem g) => (ItemLoader.DelegateModifyHitNPC)Delegate.CreateDelegate(typeof(ItemLoader.DelegateModifyHitNPC), g, methodof(GlobalItem.ModifyHitNPC(Item, Player, NPC, int*, float*, bool*))));

		// Token: 0x040013A5 RID: 5029
		private static ItemLoader.HookList HookOnHitNPC = ItemLoader.AddHook<Action<Item, Player, NPC, int, float, bool>>((GlobalItem g) => (Action<Item, Player, NPC, int, float, bool>)Delegate.CreateDelegate(typeof(Action<Item, Player, NPC, int, float, bool>), g, methodof(GlobalItem.OnHitNPC(Item, Player, NPC, int, float, bool))));

		// Token: 0x040013A6 RID: 5030
		private static ItemLoader.HookList HookCanHitPvp = ItemLoader.AddHook<Func<Item, Player, Player, bool>>((GlobalItem g) => (Func<Item, Player, Player, bool>)Delegate.CreateDelegate(typeof(Func<Item, Player, Player, bool>), g, methodof(GlobalItem.CanHitPvp(Item, Player, Player))));

		// Token: 0x040013A7 RID: 5031
		private static ItemLoader.HookList HookModifyHitPvp = ItemLoader.AddHook<ItemLoader.DelegateModifyHitPvp>((GlobalItem g) => (ItemLoader.DelegateModifyHitPvp)Delegate.CreateDelegate(typeof(ItemLoader.DelegateModifyHitPvp), g, methodof(GlobalItem.ModifyHitPvp(Item, Player, Player, int*, bool*))));

		// Token: 0x040013A8 RID: 5032
		private static ItemLoader.HookList HookOnHitPvp = ItemLoader.AddHook<Action<Item, Player, Player, int, bool>>((GlobalItem g) => (Action<Item, Player, Player, int, bool>)Delegate.CreateDelegate(typeof(Action<Item, Player, Player, int, bool>), g, methodof(GlobalItem.OnHitPvp(Item, Player, Player, int, bool))));

		// Token: 0x040013A9 RID: 5033
		private static ItemLoader.HookList HookUseItem = ItemLoader.AddHook<Func<Item, Player, bool>>((GlobalItem g) => (Func<Item, Player, bool>)Delegate.CreateDelegate(typeof(Func<Item, Player, bool>), g, methodof(GlobalItem.UseItem(Item, Player))));

		// Token: 0x040013AA RID: 5034
		private static ItemLoader.HookList HookConsumeItem = ItemLoader.AddHook<Func<Item, Player, bool>>((GlobalItem g) => (Func<Item, Player, bool>)Delegate.CreateDelegate(typeof(Func<Item, Player, bool>), g, methodof(GlobalItem.ConsumeItem(Item, Player))));

		// Token: 0x040013AB RID: 5035
		private static ItemLoader.HookList HookOnConsumeItem = ItemLoader.AddHook<Action<Item, Player>>((GlobalItem g) => (Action<Item, Player>)Delegate.CreateDelegate(typeof(Action<Item, Player>), g, methodof(GlobalItem.OnConsumeItem(Item, Player))));

		// Token: 0x040013AC RID: 5036
		private static ItemLoader.HookList HookUseItemFrame = ItemLoader.AddHook<Func<Item, Player, bool>>((GlobalItem g) => (Func<Item, Player, bool>)Delegate.CreateDelegate(typeof(Func<Item, Player, bool>), g, methodof(GlobalItem.UseItemFrame(Item, Player))));

		// Token: 0x040013AD RID: 5037
		private static ItemLoader.HookList HookHoldItemFrame = ItemLoader.AddHook<Func<Item, Player, bool>>((GlobalItem g) => (Func<Item, Player, bool>)Delegate.CreateDelegate(typeof(Func<Item, Player, bool>), g, methodof(GlobalItem.HoldItemFrame(Item, Player))));

		// Token: 0x040013AE RID: 5038
		private static ItemLoader.HookList HookAltFunctionUse = ItemLoader.AddHook<Func<Item, Player, bool>>((GlobalItem g) => (Func<Item, Player, bool>)Delegate.CreateDelegate(typeof(Func<Item, Player, bool>), g, methodof(GlobalItem.AltFunctionUse(Item, Player))));

		// Token: 0x040013AF RID: 5039
		private static ItemLoader.HookList HookUpdateInventory = ItemLoader.AddHook<Action<Item, Player>>((GlobalItem g) => (Action<Item, Player>)Delegate.CreateDelegate(typeof(Action<Item, Player>), g, methodof(GlobalItem.UpdateInventory(Item, Player))));

		// Token: 0x040013B0 RID: 5040
		private static ItemLoader.HookList HookUpdateEquip = ItemLoader.AddHook<Action<Item, Player>>((GlobalItem g) => (Action<Item, Player>)Delegate.CreateDelegate(typeof(Action<Item, Player>), g, methodof(GlobalItem.UpdateEquip(Item, Player))));

		// Token: 0x040013B1 RID: 5041
		private static ItemLoader.HookList HookUpdateAccessory = ItemLoader.AddHook<Action<Item, Player, bool>>((GlobalItem g) => (Action<Item, Player, bool>)Delegate.CreateDelegate(typeof(Action<Item, Player, bool>), g, methodof(GlobalItem.UpdateAccessory(Item, Player, bool))));

		// Token: 0x040013B2 RID: 5042
		private static ItemLoader.HookList HookUpdateArmorSet = ItemLoader.AddHook<Action<Player, string>>((GlobalItem g) => (Action<Player, string>)Delegate.CreateDelegate(typeof(Action<Player, string>), g, methodof(GlobalItem.UpdateArmorSet(Player, string))));

		// Token: 0x040013B3 RID: 5043
		private static ItemLoader.HookList HookPreUpdateVanitySet = ItemLoader.AddHook<Action<Player, string>>((GlobalItem g) => (Action<Player, string>)Delegate.CreateDelegate(typeof(Action<Player, string>), g, methodof(GlobalItem.PreUpdateVanitySet(Player, string))));

		// Token: 0x040013B4 RID: 5044
		private static ItemLoader.HookList HookUpdateVanitySet = ItemLoader.AddHook<Action<Player, string>>((GlobalItem g) => (Action<Player, string>)Delegate.CreateDelegate(typeof(Action<Player, string>), g, methodof(GlobalItem.UpdateVanitySet(Player, string))));

		// Token: 0x040013B5 RID: 5045
		private static ItemLoader.HookList HookArmorSetShadows = ItemLoader.AddHook<Action<Player, string>>((GlobalItem g) => (Action<Player, string>)Delegate.CreateDelegate(typeof(Action<Player, string>), g, methodof(GlobalItem.ArmorSetShadows(Player, string))));

		// Token: 0x040013B6 RID: 5046
		private static ItemLoader.HookList HookSetMatch = ItemLoader.AddHook<ItemLoader.DelegateSetMatch>((GlobalItem g) => (ItemLoader.DelegateSetMatch)Delegate.CreateDelegate(typeof(ItemLoader.DelegateSetMatch), g, methodof(GlobalItem.SetMatch(int, int, bool, int*, bool*))));

		// Token: 0x040013B7 RID: 5047
		private static ItemLoader.HookList HookCanRightClick = ItemLoader.AddHook<Func<Item, bool>>((GlobalItem g) => (Func<Item, bool>)Delegate.CreateDelegate(typeof(Func<Item, bool>), g, methodof(GlobalItem.CanRightClick(Item))));

		// Token: 0x040013B8 RID: 5048
		private static ItemLoader.HookList HookRightClick = ItemLoader.AddHook<Action<Item, Player>>((GlobalItem g) => (Action<Item, Player>)Delegate.CreateDelegate(typeof(Action<Item, Player>), g, methodof(GlobalItem.RightClick(Item, Player))));

		// Token: 0x040013B9 RID: 5049
		private static ItemLoader.HookList HookPreOpenVanillaBag = ItemLoader.AddHook<Func<string, Player, int, bool>>((GlobalItem g) => (Func<string, Player, int, bool>)Delegate.CreateDelegate(typeof(Func<string, Player, int, bool>), g, methodof(GlobalItem.PreOpenVanillaBag(string, Player, int))));

		// Token: 0x040013BA RID: 5050
		private static ItemLoader.HookList HookOpenVanillaBag = ItemLoader.AddHook<Action<string, Player, int>>((GlobalItem g) => (Action<string, Player, int>)Delegate.CreateDelegate(typeof(Action<string, Player, int>), g, methodof(GlobalItem.OpenVanillaBag(string, Player, int))));

		// Token: 0x040013BB RID: 5051
		private static ItemLoader.HookList HookReforgePrice = ItemLoader.AddHook<ItemLoader.DelegateReforgePrice>((GlobalItem g) => (ItemLoader.DelegateReforgePrice)Delegate.CreateDelegate(typeof(ItemLoader.DelegateReforgePrice), g, methodof(GlobalItem.ReforgePrice(Item, int*, bool*))));

		// Token: 0x040013BC RID: 5052
		private static ItemLoader.HookList HookPreReforge = ItemLoader.AddHook<Func<Item, bool>>((GlobalItem g) => (Func<Item, bool>)Delegate.CreateDelegate(typeof(Func<Item, bool>), g, methodof(GlobalItem.NewPreReforge(Item))));

		// Token: 0x040013BD RID: 5053
		private static ItemLoader.HookList HookPostReforge = ItemLoader.AddHook<Action<Item>>((GlobalItem g) => (Action<Item>)Delegate.CreateDelegate(typeof(Action<Item>), g, methodof(GlobalItem.PostReforge(Item))));

		// Token: 0x040013BE RID: 5054
		private static ItemLoader.HookList HookDrawHands = ItemLoader.AddHook<ItemLoader.DelegateDrawHands>((GlobalItem g) => (ItemLoader.DelegateDrawHands)Delegate.CreateDelegate(typeof(ItemLoader.DelegateDrawHands), g, methodof(GlobalItem.DrawHands(int, bool*, bool*))));

		// Token: 0x040013BF RID: 5055
		private static ItemLoader.HookList HookDrawHair = ItemLoader.AddHook<ItemLoader.DelegateDrawHair>((GlobalItem g) => (ItemLoader.DelegateDrawHair)Delegate.CreateDelegate(typeof(ItemLoader.DelegateDrawHair), g, methodof(GlobalItem.DrawHair(int, bool*, bool*))));

		// Token: 0x040013C0 RID: 5056
		private static ItemLoader.HookList HookDrawHead = ItemLoader.AddHook<Func<int, bool>>((GlobalItem g) => (Func<int, bool>)Delegate.CreateDelegate(typeof(Func<int, bool>), g, methodof(GlobalItem.DrawHead(int))));

		// Token: 0x040013C1 RID: 5057
		private static ItemLoader.HookList HookDrawBody = ItemLoader.AddHook<Func<int, bool>>((GlobalItem g) => (Func<int, bool>)Delegate.CreateDelegate(typeof(Func<int, bool>), g, methodof(GlobalItem.DrawBody(int))));

		// Token: 0x040013C2 RID: 5058
		private static ItemLoader.HookList HookDrawLegs = ItemLoader.AddHook<Func<int, int, bool>>((GlobalItem g) => (Func<int, int, bool>)Delegate.CreateDelegate(typeof(Func<int, int, bool>), g, methodof(GlobalItem.DrawLegs(int, int))));

		// Token: 0x040013C3 RID: 5059
		private static ItemLoader.HookList HookDrawArmorColor = ItemLoader.AddHook<ItemLoader.DelegateDrawArmorColor>((GlobalItem g) => (ItemLoader.DelegateDrawArmorColor)Delegate.CreateDelegate(typeof(ItemLoader.DelegateDrawArmorColor), g, methodof(GlobalItem.DrawArmorColor(EquipType, int, Player, float, Color*, int*, Color*))));

		// Token: 0x040013C4 RID: 5060
		private static ItemLoader.HookList HookArmorArmGlowMask = ItemLoader.AddHook<ItemLoader.DelegateArmorArmGlowMask>((GlobalItem g) => (ItemLoader.DelegateArmorArmGlowMask)Delegate.CreateDelegate(typeof(ItemLoader.DelegateArmorArmGlowMask), g, methodof(GlobalItem.ArmorArmGlowMask(int, Player, float, int*, Color*))));

		// Token: 0x040013C5 RID: 5061
		private static ItemLoader.HookList HookVerticalWingSpeeds = ItemLoader.AddHook<ItemLoader.DelegateVerticalWingSpeeds>((GlobalItem g) => (ItemLoader.DelegateVerticalWingSpeeds)Delegate.CreateDelegate(typeof(ItemLoader.DelegateVerticalWingSpeeds), g, methodof(GlobalItem.VerticalWingSpeeds(Item, Player, float*, float*, float*, float*, float*))));

		// Token: 0x040013C6 RID: 5062
		private static ItemLoader.HookList HookHorizontalWingSpeeds = ItemLoader.AddHook<ItemLoader.DelegateHorizontalWingSpeeds>((GlobalItem g) => (ItemLoader.DelegateHorizontalWingSpeeds)Delegate.CreateDelegate(typeof(ItemLoader.DelegateHorizontalWingSpeeds), g, methodof(GlobalItem.HorizontalWingSpeeds(Item, Player, float*, float*))));

		// Token: 0x040013C7 RID: 5063
		private static ItemLoader.HookList HookWingUpdate = ItemLoader.AddHook<Func<int, Player, bool, bool>>((GlobalItem g) => (Func<int, Player, bool, bool>)Delegate.CreateDelegate(typeof(Func<int, Player, bool, bool>), g, methodof(GlobalItem.WingUpdate(int, Player, bool))));

		// Token: 0x040013C8 RID: 5064
		private static ItemLoader.HookList HookUpdate = ItemLoader.AddHook<ItemLoader.DelegateUpdate>((GlobalItem g) => (ItemLoader.DelegateUpdate)Delegate.CreateDelegate(typeof(ItemLoader.DelegateUpdate), g, methodof(GlobalItem.Update(Item, float*, float*))));

		// Token: 0x040013C9 RID: 5065
		private static ItemLoader.HookList HookPostUpdate = ItemLoader.AddHook<Action<Item>>((GlobalItem g) => (Action<Item>)Delegate.CreateDelegate(typeof(Action<Item>), g, methodof(GlobalItem.PostUpdate(Item))));

		// Token: 0x040013CA RID: 5066
		private static ItemLoader.HookList HookGrabRange = ItemLoader.AddHook<ItemLoader.DelegateGrabRange>((GlobalItem g) => (ItemLoader.DelegateGrabRange)Delegate.CreateDelegate(typeof(ItemLoader.DelegateGrabRange), g, methodof(GlobalItem.GrabRange(Item, Player, int*))));

		// Token: 0x040013CB RID: 5067
		private static ItemLoader.HookList HookGrabStyle = ItemLoader.AddHook<Func<Item, Player, bool>>((GlobalItem g) => (Func<Item, Player, bool>)Delegate.CreateDelegate(typeof(Func<Item, Player, bool>), g, methodof(GlobalItem.GrabStyle(Item, Player))));

		// Token: 0x040013CC RID: 5068
		private static ItemLoader.HookList HookCanPickup = ItemLoader.AddHook<Func<Item, Player, bool>>((GlobalItem g) => (Func<Item, Player, bool>)Delegate.CreateDelegate(typeof(Func<Item, Player, bool>), g, methodof(GlobalItem.CanPickup(Item, Player))));

		// Token: 0x040013CD RID: 5069
		private static ItemLoader.HookList HookOnPickup = ItemLoader.AddHook<Func<Item, Player, bool>>((GlobalItem g) => (Func<Item, Player, bool>)Delegate.CreateDelegate(typeof(Func<Item, Player, bool>), g, methodof(GlobalItem.OnPickup(Item, Player))));

		// Token: 0x040013CE RID: 5070
		private static ItemLoader.HookList HookItemSpace = ItemLoader.AddHook<Func<Item, Player, bool>>((GlobalItem g) => (Func<Item, Player, bool>)Delegate.CreateDelegate(typeof(Func<Item, Player, bool>), g, methodof(GlobalItem.ItemSpace(Item, Player))));

		// Token: 0x040013CF RID: 5071
		private static ItemLoader.HookList HookGetAlpha = ItemLoader.AddHook<Func<Item, Color, Color?>>((GlobalItem g) => (Func<Item, Color, Color?>)Delegate.CreateDelegate(typeof(Func<Item, Color, Color?>), g, methodof(GlobalItem.GetAlpha(Item, Color))));

		// Token: 0x040013D0 RID: 5072
		private static ItemLoader.HookList HookPreDrawInWorld = ItemLoader.AddHook<ItemLoader.DelegatePreDrawInWorld>((GlobalItem g) => (ItemLoader.DelegatePreDrawInWorld)Delegate.CreateDelegate(typeof(ItemLoader.DelegatePreDrawInWorld), g, methodof(GlobalItem.PreDrawInWorld(Item, SpriteBatch, Color, Color, float*, float*, int))));

		// Token: 0x040013D1 RID: 5073
		private static ItemLoader.HookList HookPostDrawInWorld = ItemLoader.AddHook<Action<Item, SpriteBatch, Color, Color, float, float, int>>((GlobalItem g) => (Action<Item, SpriteBatch, Color, Color, float, float, int>)Delegate.CreateDelegate(typeof(Action<Item, SpriteBatch, Color, Color, float, float, int>), g, methodof(GlobalItem.PostDrawInWorld(Item, SpriteBatch, Color, Color, float, float, int))));

		// Token: 0x040013D2 RID: 5074
		private static ItemLoader.HookList HookPreDrawInInventory = ItemLoader.AddHook<Func<Item, SpriteBatch, Vector2, Rectangle, Color, Color, Vector2, float, bool>>((GlobalItem g) => (Func<Item, SpriteBatch, Vector2, Rectangle, Color, Color, Vector2, float, bool>)Delegate.CreateDelegate(typeof(Func<Item, SpriteBatch, Vector2, Rectangle, Color, Color, Vector2, float, bool>), g, methodof(GlobalItem.PreDrawInInventory(Item, SpriteBatch, Vector2, Rectangle, Color, Color, Vector2, float))));

		// Token: 0x040013D3 RID: 5075
		private static ItemLoader.HookList HookPostDrawInInventory = ItemLoader.AddHook<Action<Item, SpriteBatch, Vector2, Rectangle, Color, Color, Vector2, float>>((GlobalItem g) => (Action<Item, SpriteBatch, Vector2, Rectangle, Color, Color, Vector2, float>)Delegate.CreateDelegate(typeof(Action<Item, SpriteBatch, Vector2, Rectangle, Color, Color, Vector2, float>), g, methodof(GlobalItem.PostDrawInInventory(Item, SpriteBatch, Vector2, Rectangle, Color, Color, Vector2, float))));

		// Token: 0x040013D4 RID: 5076
		private static ItemLoader.HookList HookHoldoutOffset = ItemLoader.AddHook<Func<int, Vector2?>>((GlobalItem g) => (Func<int, Vector2?>)Delegate.CreateDelegate(typeof(Func<int, Vector2?>), g, methodof(GlobalItem.HoldoutOffset(int))));

		// Token: 0x040013D5 RID: 5077
		private static ItemLoader.HookList HookHoldoutOrigin = ItemLoader.AddHook<Func<int, Vector2?>>((GlobalItem g) => (Func<int, Vector2?>)Delegate.CreateDelegate(typeof(Func<int, Vector2?>), g, methodof(GlobalItem.HoldoutOrigin(int))));

		// Token: 0x040013D6 RID: 5078
		private static ItemLoader.HookList HookCanEquipAccessory = ItemLoader.AddHook<Func<Item, Player, int, bool>>((GlobalItem g) => (Func<Item, Player, int, bool>)Delegate.CreateDelegate(typeof(Func<Item, Player, int, bool>), g, methodof(GlobalItem.CanEquipAccessory(Item, Player, int))));

		// Token: 0x040013D7 RID: 5079
		private static ItemLoader.HookList HookExtractinatorUse = ItemLoader.AddHook<ItemLoader.DelegateExtractinatorUse>((GlobalItem g) => (ItemLoader.DelegateExtractinatorUse)Delegate.CreateDelegate(typeof(ItemLoader.DelegateExtractinatorUse), g, methodof(GlobalItem.ExtractinatorUse(int, int*, int*))));

		// Token: 0x040013D8 RID: 5080
		private static ItemLoader.HookList HookCaughtFishStack = ItemLoader.AddHook<ItemLoader.DelegateCaughtFishStack>((GlobalItem g) => (ItemLoader.DelegateCaughtFishStack)Delegate.CreateDelegate(typeof(ItemLoader.DelegateCaughtFishStack), g, methodof(GlobalItem.CaughtFishStack(int, int*))));

		// Token: 0x040013D9 RID: 5081
		private static ItemLoader.HookList HookIsAnglerQuestAvailable = ItemLoader.AddHook<Func<int, bool>>((GlobalItem g) => (Func<int, bool>)Delegate.CreateDelegate(typeof(Func<int, bool>), g, methodof(GlobalItem.IsAnglerQuestAvailable(int))));

		// Token: 0x040013DA RID: 5082
		private static ItemLoader.HookList HookAnglerChat = ItemLoader.AddHook<ItemLoader.DelegateAnglerChat>((GlobalItem g) => (ItemLoader.DelegateAnglerChat)Delegate.CreateDelegate(typeof(ItemLoader.DelegateAnglerChat), g, methodof(GlobalItem.AnglerChat(int, string*, string*))));

		// Token: 0x040013DB RID: 5083
		private static ItemLoader.HookList HookOnCraft = ItemLoader.AddHook<Action<Item, Recipe>>((GlobalItem g) => (Action<Item, Recipe>)Delegate.CreateDelegate(typeof(Action<Item, Recipe>), g, methodof(GlobalItem.OnCraft(Item, Recipe))));

		// Token: 0x040013DC RID: 5084
		private static ItemLoader.HookList HookPreDrawTooltip = ItemLoader.AddHook<ItemLoader.DelegatePreDrawTooltip>((GlobalItem g) => (ItemLoader.DelegatePreDrawTooltip)Delegate.CreateDelegate(typeof(ItemLoader.DelegatePreDrawTooltip), g, methodof(GlobalItem.PreDrawTooltip(Item, ReadOnlyCollection<TooltipLine>, int*, int*))));

		// Token: 0x040013DD RID: 5085
		private static ItemLoader.HookList HookPostDrawTooltip = ItemLoader.AddHook<ItemLoader.DelegatePostDrawTooltip>((GlobalItem g) => (ItemLoader.DelegatePostDrawTooltip)Delegate.CreateDelegate(typeof(ItemLoader.DelegatePostDrawTooltip), g, methodof(GlobalItem.PostDrawTooltip(Item, ReadOnlyCollection<DrawableTooltipLine>))));

		// Token: 0x040013DE RID: 5086
		private static ItemLoader.HookList HookPreDrawTooltipLine = ItemLoader.AddHook<ItemLoader.DelegatePreDrawTooltipLine>((GlobalItem g) => (ItemLoader.DelegatePreDrawTooltipLine)Delegate.CreateDelegate(typeof(ItemLoader.DelegatePreDrawTooltipLine), g, methodof(GlobalItem.PreDrawTooltipLine(Item, DrawableTooltipLine, int*))));

		// Token: 0x040013DF RID: 5087
		private static ItemLoader.HookList HookPostDrawTooltipLine = ItemLoader.AddHook<ItemLoader.DelegatePostDrawTooltipLine>((GlobalItem g) => (ItemLoader.DelegatePostDrawTooltipLine)Delegate.CreateDelegate(typeof(ItemLoader.DelegatePostDrawTooltipLine), g, methodof(GlobalItem.PostDrawTooltipLine(Item, DrawableTooltipLine))));

		// Token: 0x040013E0 RID: 5088
		private static ItemLoader.HookList HookModifyTooltips = ItemLoader.AddHook<Action<Item, List<TooltipLine>>>((GlobalItem g) => (Action<Item, List<TooltipLine>>)Delegate.CreateDelegate(typeof(Action<Item, List<TooltipLine>>), g, methodof(GlobalItem.ModifyTooltips(Item, List<TooltipLine>))));

		// Token: 0x040013E1 RID: 5089
		private static ItemLoader.HookList HookNeedsSaving = ItemLoader.AddHook<Func<Item, bool>>((GlobalItem g) => (Func<Item, bool>)Delegate.CreateDelegate(typeof(Func<Item, bool>), g, methodof(GlobalItem.NeedsSaving(Item))));

		// Token: 0x0200019A RID: 410
		private class HookList
		{
			// Token: 0x06001151 RID: 4433 RVA: 0x0000EE2E File Offset: 0x0000D02E
			public HookList(MethodInfo method)
			{
				this.method = method;
			}

			// Token: 0x040013E2 RID: 5090
			public GlobalItem[] arr = new GlobalItem[0];

			// Token: 0x040013E3 RID: 5091
			public readonly MethodInfo method;
		}

		// Token: 0x0200019B RID: 411
		// (Invoke) Token: 0x06001153 RID: 4435
		private delegate void DelegateGetWeaponDamage(Item item, Player player, ref int damage);

		// Token: 0x0200019C RID: 412
		// (Invoke) Token: 0x06001157 RID: 4439
		private delegate void DelegateGetWeaponKnockback(Item item, Player player, ref float knockback);

		// Token: 0x0200019D RID: 413
		// (Invoke) Token: 0x0600115B RID: 4443
		private delegate void DelegateGetWeaponCrit(Item item, Player player, ref int crit);

		// Token: 0x0200019E RID: 414
		// (Invoke) Token: 0x0600115F RID: 4447
		private delegate void DelegatePickAmmo(Item item, Player player, ref int type, ref float speed, ref int damage, ref float knockback);

		// Token: 0x0200019F RID: 415
		// (Invoke) Token: 0x06001163 RID: 4451
		private delegate bool DelegateShoot(Item item, Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack);

		// Token: 0x020001A0 RID: 416
		// (Invoke) Token: 0x06001167 RID: 4455
		private delegate void DelegateUseItemHitbox(Item item, Player player, ref Rectangle hitbox, ref bool noHitbox);

		// Token: 0x020001A1 RID: 417
		// (Invoke) Token: 0x0600116B RID: 4459
		private delegate void DelegateModifyHitNPC(Item item, Player player, NPC target, ref int damage, ref float knockBack, ref bool crit);

		// Token: 0x020001A2 RID: 418
		// (Invoke) Token: 0x0600116F RID: 4463
		private delegate void DelegateModifyHitPvp(Item item, Player player, Player target, ref int damage, ref bool crit);

		// Token: 0x020001A3 RID: 419
		// (Invoke) Token: 0x06001173 RID: 4467
		private delegate void DelegateSetMatch(int armorSlot, int type, bool male, ref int equipSlot, ref bool robes);

		// Token: 0x020001A4 RID: 420
		// (Invoke) Token: 0x06001177 RID: 4471
		private delegate bool DelegateReforgePrice(Item item, ref int reforgePrice, ref bool canApplyDiscount);

		// Token: 0x020001A5 RID: 421
		// (Invoke) Token: 0x0600117B RID: 4475
		private delegate void DelegateDrawHands(int body, ref bool drawHands, ref bool drawArms);

		// Token: 0x020001A6 RID: 422
		// (Invoke) Token: 0x0600117F RID: 4479
		private delegate void DelegateDrawHair(int body, ref bool drawHair, ref bool drawAltHair);

		// Token: 0x020001A7 RID: 423
		// (Invoke) Token: 0x06001183 RID: 4483
		private delegate void DelegateDrawArmorColor(EquipType type, int slot, Player drawPlayer, float shadow, ref Color color, ref int glowMask, ref Color glowMaskColor);

		// Token: 0x020001A8 RID: 424
		// (Invoke) Token: 0x06001187 RID: 4487
		private delegate void DelegateArmorArmGlowMask(int slot, Player drawPlayer, float shadow, ref int glowMask, ref Color color);

		// Token: 0x020001A9 RID: 425
		// (Invoke) Token: 0x0600118B RID: 4491
		private delegate void DelegateVerticalWingSpeeds(Item item, Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend);

		// Token: 0x020001AA RID: 426
		// (Invoke) Token: 0x0600118F RID: 4495
		private delegate void DelegateHorizontalWingSpeeds(Item item, Player player, ref float speed, ref float acceleration);

		// Token: 0x020001AB RID: 427
		// (Invoke) Token: 0x06001193 RID: 4499
		private delegate void DelegateUpdate(Item item, ref float gravity, ref float maxFallSpeed);

		// Token: 0x020001AC RID: 428
		// (Invoke) Token: 0x06001197 RID: 4503
		private delegate void DelegateGrabRange(Item item, Player player, ref int grabRange);

		// Token: 0x020001AD RID: 429
		// (Invoke) Token: 0x0600119B RID: 4507
		private delegate bool DelegatePreDrawInWorld(Item item, SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI);

		// Token: 0x020001AE RID: 430
		// (Invoke) Token: 0x0600119F RID: 4511
		private delegate void DelegateExtractinatorUse(int extractType, ref int resultType, ref int resultStack);

		// Token: 0x020001AF RID: 431
		// (Invoke) Token: 0x060011A3 RID: 4515
		private delegate void DelegateCaughtFishStack(int type, ref int stack);

		// Token: 0x020001B0 RID: 432
		// (Invoke) Token: 0x060011A7 RID: 4519
		private delegate void DelegateAnglerChat(int type, ref string chat, ref string catchLocation);

		// Token: 0x020001B1 RID: 433
		// (Invoke) Token: 0x060011AB RID: 4523
		private delegate bool DelegatePreDrawTooltip(Item item, ReadOnlyCollection<TooltipLine> lines, ref int x, ref int y);

		// Token: 0x020001B2 RID: 434
		// (Invoke) Token: 0x060011AF RID: 4527
		private delegate void DelegatePostDrawTooltip(Item item, ReadOnlyCollection<DrawableTooltipLine> lines);

		// Token: 0x020001B3 RID: 435
		// (Invoke) Token: 0x060011B3 RID: 4531
		private delegate bool DelegatePreDrawTooltipLine(Item item, DrawableTooltipLine line, ref int yOffset);

		// Token: 0x020001B4 RID: 436
		// (Invoke) Token: 0x060011B7 RID: 4535
		private delegate void DelegatePostDrawTooltipLine(Item item, DrawableTooltipLine line);
	}
}
